Sat Jan  5 23:55:48 EST 2008  Mark Stosberg <[EMAIL PROTECTED]>
  * issue526: improve Perl test suite.
      - better compatibility when path to darcs includes a space
      - better portability by eliminating some system calls
      - general style improvements

Sun Jan  6 00:26:22 EST 2008  Mark Stosberg <[EMAIL PROTECTED]>
  * prevent warning in test script and remove mysterious exit(1) call.
New patches:

[issue526: improve Perl test suite.
Mark Stosberg <[EMAIL PROTECTED]>**20080106045548
     - better compatibility when path to darcs includes a space
     - better portability by eliminating some system calls
     - general style improvements
] {
hunk ./tests/annotate.pl 5
+use Test::More 'no_plan';
hunk ./tests/annotate.pl 7
+use Shell::Command;
hunk ./tests/annotate.pl 9
-use Test::More qw/no_plan/;
-use strict;
-use vars qw/$DARCS/;
-
-die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
-$DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
+use strict; 
+use warnings;
hunk ./tests/annotate.pl 13
-`mkdir temp1`;
-chdir 'temp1';
-`$DARCS init`;
+ok( mkpath('temp1'), "temp1 created");
+mkpath('temp1');
+ok(chdir('temp1'), "chdir temp1");
+darcs 'init';
hunk ./tests/annotate.pl 23
-`$DARCS add date.t`;
+darcs 'add date.t';
hunk ./tests/annotate.pl 25
-like(`$DARCS record -A 'Mark Stosberg <[EMAIL PROTECTED]>' -a -m foo date.t 2>&1`, qr/finished recording/i, $test_name);
+like(darcs(q(record -A 'Mark Stosberg <[EMAIL PROTECTED]>' -a -m foo date.t)), qr/finished recording/i, $test_name);
hunk ./tests/annotate.pl 29
-like(`$DARCS annotate --xml date.t `,qr/&lt;[EMAIL PROTECTED]&gt;/,'annotate --xml encodes < and >');
+like(darcs(q(annotate --xml date.t)),qr/&lt;[EMAIL PROTECTED]&gt;/,'annotate --xml encodes < and >');
hunk ./tests/annotate.pl 32
-`rm -rf temp1`;
+cleanup 'temp1';
hunk ./tests/changes.pl 5
+use Test::More 'no_plan';
hunk ./tests/changes.pl 8
-use Test::More qw/no_plan/;
+use Shell::Command;
hunk ./tests/changes.pl 10
-use vars qw/$DARCS/;
-
-die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
-$DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
hunk ./tests/changes.pl 12
-`mkdir temp1`;
-chdir 'temp1';
-`$DARCS init`;
+ok(mkpath('temp1'), "temp1 created");
+ok(chdir('temp1'), "chdir temp1");
+darcs 'init';
+
hunk ./tests/changes.pl 22
-`$DARCS add date.t`;
+darcs 'add date.t';
hunk ./tests/changes.pl 24
-like(`$DARCS record -A 'Mark Stosberg <[EMAIL PROTECTED]>' -a -m foo date.t 2>&1`, qr/finished recording/i, $test_name);
+like(darcs(q(record -A 'Mark Stosberg <[EMAIL PROTECTED]>' -a -m foo date.t)), qr/finished recording/i, $test_name);
hunk ./tests/changes.pl 28
-like(`$DARCS changes date.t`,qr/foo/,'changes file.txt: trivial case works');
-like(`$DARCS changes --last=1 date.t`,qr/foo/,'changes --last=1 file.txt');
-like(`$DARCS changes --last=1 --summary date.t`,qr/foo/,'changes --last=1 --summary file.txt');
-
-like(`$DARCS changes --last=1 --xml `,qr/&lt;[EMAIL PROTECTED]&gt;/,'changes --last=1 --xml encodes < and >');
+like(darcs(q(changes date.t)),                   qr/foo/,'changes file.txt: trivial case works');
+like(darcs(q(changes --last=1 date.t)),          qr/foo/,'changes --last=1 file.txt');
+like(darcs(q(changes --last=1 --summary date.t)),qr/foo/,'changes --last=1 --summary file.txt');
+like(darcs(q(changes --last=1 --xml )),         qr/&lt;[EMAIL PROTECTED]&gt;/,'changes --last=1 --xml encodes < and >');
hunk ./tests/changes.pl 36
-for (my $i = 0; $i <= 49; $i++) {
+for (my $i = 0; $i <= 5; $i++) {
+    sleep 1; # helps make sure we detect changes. 
hunk ./tests/changes.pl 39
-    `$DARCS record -A x -a -m "foo record num $i" date.t 2>&1`;
+    my $out = darcs(qq(record -A x -a -m "foo record num $i" date.t));
+    like( $out, qr/Finished record/i, "foo record num $i: success");
hunk ./tests/changes.pl 43
-like(`$DARCS changes date.t`,qr/foo/,'after 50 records: changes file.txt: trivial case works');
-like(`$DARCS changes --last=1 date.t`,qr/foo/,'after 50 records: changes --last=1 file.txt');
-like(`$DARCS changes --last=1 --summary date.t`,qr/foo/,'after 50 records: changes --last=1 --summary file.txt');
+like(darcs(q(changes date.t)),                   qr/foo/,'after 50 records: changes file.txt: trivial case works');
+like(darcs(q(changes --last=1 date.t)),          qr/foo/,'after 50 records: changes --last=1 file.txt');
+like(darcs(q(changes --last=1 --summary date.t)),qr/foo/,'after 50 records: changes --last=1 --summary file.txt');
hunk ./tests/changes.pl 49
-like(`$DARCS changes --context --from-patch="num 1\$" --to-patch="num 4\$"`,
+
+like(darcs(q(changes --context --from-patch='num 1' --to-patch='num 4')),
hunk ./tests/changes.pl 57
-`darcs add second_file.t`;
-like(`darcs record -A x -a -m adding_second_file second_file.t 2>&1`, qr/finished recording/i, 'recorded second file');
+darcs 'add second_file.t';
+like(darcs(q(record -A x -a -m adding_second_file second_file.t)), qr/finished recording/i, 'recorded second file');
hunk ./tests/changes.pl 63
-    like(`darcs changes --last=1 date.t`,qr/foo/,$test_name);
+    like(darcs(q(changes --last=1 date.t)),qr/foo/,$test_name);
hunk ./tests/changes.pl 68
-`rm -rf temp1`;
+cleanup 'temp1';
hunk ./tests/changes_with_move.pl 5
+use Test::More 'no_plan';
hunk ./tests/changes_with_move.pl 8
-use Test::More qw/no_plan/;
+use Shell::Command;
hunk ./tests/changes_with_move.pl 10
-use vars qw/$DARCS/;
-
-die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
-$DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
-
-
+use warnings;
hunk ./tests/changes_with_move.pl 13
-`mkdir temp1`;
+mkpath  'temp1';
hunk ./tests/changes_with_move.pl 15
-`$DARCS init`;
+darcs 'init';
hunk ./tests/changes_with_move.pl 23
-like(`$DARCS add foo`, qr/^$/,
+like(darcs(q(add foo)), qr/^$/,
hunk ./tests/changes_with_move.pl 26
-like(`$DARCS record -m 'add foo' -a`, qr/Finished recording patch 'add foo'/,
+like(darcs(q( record -m 'add foo' -a)), qr/Finished recording patch 'add foo'/,
hunk ./tests/changes_with_move.pl 29
-`mkdir d`;
+mkpath 'd';
hunk ./tests/changes_with_move.pl 31
-like(`$DARCS add d`, qr/^$/,
+like(darcs('add d'), qr/^$/,
hunk ./tests/changes_with_move.pl 34
-like(`$DARCS record -m 'add d' -a`, qr/Finished recording patch 'add d'/,
+like(darcs(q( record -m 'add d' -a)), qr/Finished recording patch 'add d'/,
hunk ./tests/changes_with_move.pl 37
-like(`$DARCS mv foo d`, qr/^$/,
+like(darcs(q( mv foo d)), qr/^$/,
hunk ./tests/changes_with_move.pl 40
-like(`$DARCS record -m 'mv foo to d' -a`,
+like(darcs(q( record -m 'mv foo to d' -a)),
hunk ./tests/changes_with_move.pl 44
-like(`$DARCS mv d directory`, qr/^$/,
+like(darcs(q( mv d directory)), qr/^$/,
hunk ./tests/changes_with_move.pl 47
-like(`$DARCS record -m 'mv d to directory' -a`,
+like(darcs(q( record -m 'mv d to directory' -a)),
hunk ./tests/changes_with_move.pl 53
-like(`$DARCS record -m 'modify directory/foo' -a`,
+like(darcs(q( record -m 'modify directory/foo' -a)),
hunk ./tests/changes_with_move.pl 57
-my $changes_output = `$DARCS changes directory/foo`;
+my $changes_output = darcs(q( changes directory/foo));
hunk ./tests/changes_with_move.pl 64
-like(`$DARCS mv directory/foo directory/bar`, qr/^$/,
+like(darcs(q( mv directory/foo directory/bar)), qr/^$/,
hunk ./tests/changes_with_move.pl 68
-like(`$DARCS add directory/foo`, qr/^$/,
+like(darcs(q( add directory/foo)), qr/^$/,
hunk ./tests/changes_with_move.pl 71
-like(`$DARCS record -m 'mv foo then add new foo' -a`,
+like(darcs(q( record -m 'mv foo then add new foo' -a)),
hunk ./tests/changes_with_move.pl 75
-my $annotate_output = `$DARCS annotate directory/bar`;
+my $annotate_output = darcs(q( annotate directory/bar));
hunk ./tests/changes_with_move.pl 81
-#my $annotate_output = `$DARCS annotate directory/foo`;
-#like($annotate_output, qr/That has such people in it/,
-#     "darcs annotate reports 'That has such people in it'");
-
-
hunk ./tests/changes_with_move.pl 82
-`rm -rf temp1`;
+cleanup 'temp1';
hunk ./tests/external.pl 5
-use lib qw(lib/perl);
-
-use Test::More qw/no_plan/;
-
+use Test::More 'no_plan';
+use lib 'lib/perl';
hunk ./tests/lib/perl/Test/Darcs.pm 56
-use vars qw/$DARCS/;
+use vars '$DARCS';
hunk ./tests/lib/perl/Test/Darcs.pm 70
-    return `$darcs @commands 2>&1`;
+    return `"$darcs" @commands 2>&1`;
hunk ./tests/pull.pl 101
-    `echo -n y | $DARCS rollback -p C`;
+    `echo -n y | "$DARCS" rollback -p C`;
hunk ./tests/pull.pl 107
-    `echo -n y | $DARCS rollback -p B`;
+    `echo -n y | "$DARCS" rollback -p B`;
hunk ./tests/record_editor.pl 5
+use Test::More 'no_plan';
hunk ./tests/record_editor.pl 8
-use Test::More qw/no_plan/;
+use Shell::Command;
hunk ./tests/record_editor.pl 10
-use vars qw/$DARCS/;
hunk ./tests/tag.pl 5
+use Test::More 'no_plan';
hunk ./tests/tag.pl 8
-use Test::More qw/no_plan/;
+use Shell::Command;
hunk ./tests/tag.pl 10
-use vars qw/$DARCS/;
-
-die 'darcs not found' unless $ENV{DARCS} || (-x "$ENV{PWD}/../darcs");
-$DARCS = $ENV{DARCS} || "$ENV{PWD}/../darcs";
+use warnings;
hunk ./tests/tag.pl 13
-`mkdir -p temp1`; 
+mkpath  'temp1';
hunk ./tests/tag.pl 15
-`$DARCS init`;
+darcs 'init';
hunk ./tests/tag.pl 17
-`$DARCS add one`;
-`$DARCS record --patch-name 'uno' --all --author [EMAIL PROTECTED];
-my $tag_out = `$DARCS tag -A me soup 2>&1`;
+darcs 'add one';
+darcs "record --patch-name 'uno' --all --author [EMAIL PROTECTED]";
+my $tag_out = darcs "tag -A me soup";
hunk ./tests/tag.pl 23
-my $changes_out = `$DARCS changes --last 1 2>&1`;
+my $changes_out = darcs 'changes --last 1';
hunk ./tests/tag.pl 29
-`rm -rf temp1`;
+cleanup 'temp1';
}

[prevent warning in test script and remove mysterious exit(1) call.
Mark Stosberg <[EMAIL PROTECTED]>**20080106052622] {
hunk ./tests/record_editor.pl 8
-use Shell::Command;
hunk ./tests/record_editor.pl 9
+use warnings;
hunk ./tests/record_editor.pl 46
-exit(1);
}

Context:

[minor white-space and code style improvements
Mark Stosberg <[EMAIL PROTECTED]>**20080105183641] 
[typo fix on GNUmakefile comment
Mark Stosberg <[EMAIL PROTECTED]>**20080105183027] 
[refactor: improve style and portability of pull.pl test script.
Mark Stosberg <[EMAIL PROTECTED]>**20080105181751
     Many direct system calls were eliminated. No functional changes.  
] 
[add feature requested in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105150125] 
[fix bug in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105144929] 
[add test that triggers bug in issue576.
David Roundy <[EMAIL PROTECTED]>**20080105144812] 
[add configure support for libwww.
David Roundy <[EMAIL PROTECTED]>**20080104201255] 
[make bug message more explicit.
David Roundy <[EMAIL PROTECTED]>**20080104004253] 
[Initial implementation of HTTP pipelining using libwww.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20071222144902] 
[make indent slightly more concise using lines and unlines.
David Roundy <[EMAIL PROTECTED]>**20080104003953] 
[Make sure we test the 'darcs' we just built and not one in a global path.
Mark Stosberg <[EMAIL PROTECTED]>**20080102002235
     This done by using "$DARCS" instead of 'darcs'.
     However, in my case the updated test FAILS unexplainably with 2.0.0pre3,
     by failing to detect that a file has changed. 
     If I follow along in a shell and run the same commands with Darcs 2, 
     the problem does not appear. 
] 
[refactor: replace recursive indent with more concise find-and-replace syntax
Mark Stosberg <[EMAIL PROTECTED]>**20080101200447] 
[issue347 - document that single quotes should be used in .darcs/defaults
Mark Stosberg <[EMAIL PROTECTED]>**20080101164428] 
[simplify (and debug) pending handling.
David Roundy <[EMAIL PROTECTED]>**20071227133618
 Note that this change could lead to performance regressions, but I believe
 that these regressions would be strongly bounded (never worse than a
 whatsnew), and this simplification makes the code much easier to safely
 modify.
] 
[make updating of pending on pull much more efficient.
David Roundy <[EMAIL PROTECTED]>**20071224131059] 
[simplify a bit of code.
David Roundy <[EMAIL PROTECTED]>**20071224131023] 
[fix type-witness bug in HopefullyPrivate.
David Roundy <[EMAIL PROTECTED]>**20071223141149] 
[simplify Get
David Roundy <[EMAIL PROTECTED]>**20071223025108] 
[simplify tentativelyAddPatch by removing unused return value.
David Roundy <[EMAIL PROTECTED]>**20071223024400] 
[simplify away np2prims and nps2prims.
David Roundy <[EMAIL PROTECTED]>**20071223022145] 
[try to avoid rewriting patches that we've just read.
David Roundy <[EMAIL PROTECTED]>**20071222190029] 
[generalize CommandsAux utility functions.
David Roundy <[EMAIL PROTECTED]>**20071222162952] 
[add new instances for PatchInfoAnd.
David Roundy <[EMAIL PROTECTED]>**20071222144439] 
[change tentativelyAddPatch to accept a PatchInfoAnd p.
David Roundy <[EMAIL PROTECTED]>**20071222140517] 
[internal prepration for optimization saving patch writing.
David Roundy <[EMAIL PROTECTED]>**20071222134834] 
[add changelog entry.
David Roundy <[EMAIL PROTECTED]>**20071219162646] 
[add fixme indicating where the code could be simplified.
David Roundy <[EMAIL PROTECTED]>**20071221135649] 
[make reading of hashed inventories lazier.
David Roundy <[EMAIL PROTECTED]>**20071221133453] 
[resolve conflicts in mv_and_remove_tests.sh.
David Roundy <[EMAIL PROTECTED]>**20071219144638] 
[Fix !(...|...) in mv_and_remove_tests.sh.
Dave Love <[EMAIL PROTECTED]>**20071218001826
 Assume the original construct should have been `! ... | ...' and
 replace with a portable version of that.
] 
[[issue571] Redo last HAVE_TERMIO_H fix.
Dave Love <[EMAIL PROTECTED]>**20071218140508
 Not the most direct fix, but simpler.
] 
[Fix configure test for gadt type witnesses.
Dave Love <[EMAIL PROTECTED]>**20071218120139] 
[use --ignore-times in all tests.
David Roundy <[EMAIL PROTECTED]>**20071217225159
 This is because the hashed repository is a bit pickier, in that
 it no longer checks file lengths when the file modification times
 match.
] 
[enable modification time checking on hashed repositories.
David Roundy <[EMAIL PROTECTED]>**20071217220237] 
[Pass two args to `cmp' in tests, following POSIX.
Dave Love <[EMAIL PROTECTED]>**20071216180503
 Fixes some failures on Solaris.
] 
[resolve silly conflict with myself.
David Roundy <[EMAIL PROTECTED]>**20071217200855] 
[clean up SelectChanges (eliminating Bools)
David Roundy <[EMAIL PROTECTED]>**20071217191809] 
[make a few more files compile with type witnesses.
David Roundy <[EMAIL PROTECTED]>**20071217183234] 
[fix bug in revert (in writing the unrevert file).
David Roundy <[EMAIL PROTECTED]>**20071216215225] 
[make a few more files compile with type witnesses.
David Roundy <[EMAIL PROTECTED]>**20071217164815] 
[remove tabs.
David Roundy <[EMAIL PROTECTED]>**20071216224617] 
[bump version number preemptively to 2.0.0pre3.
David Roundy <[EMAIL PROTECTED]>**20071216222823] 
[fix doc bug in show contents.
David Roundy <[EMAIL PROTECTED]>**20071216214002] 
[TAG 2.0.0pre2
David Roundy <[EMAIL PROTECTED]>**20071216201647] 
Patch bundle hash:
6ec5c0c6db4e9e2a5f5b785fb336ada60d2e9b8a
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to