aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2012-01-26 16:57:00 -0500
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2012-01-26 16:57:00 -0500
commitac8eab29e8394aca4c0b23a6687ec947ea1ac869 (patch)
treebe657e47f810b886bc218526ddceb10f698de780 /t
parent9fd09149a36e13addcb822e41d0309c64a004764 (diff)
downloadikiwiki-ac8eab29e8394aca4c0b23a6687ec947ea1ac869.tar
ikiwiki-ac8eab29e8394aca4c0b23a6687ec947ea1ac869.tar.gz
Uncomment the CVS keyword substitution mode tests, and make them pass:
Extract cvs_keyword_subst_args() and ensure it runs in $config{srcdir}. Using Perl's -T operator appears to work equally well, perhaps switch?
Diffstat (limited to 't')
-rwxr-xr-xt/cvs.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/cvs.t b/t/cvs.t
index f29e58a6a..1c20d7741 100755
--- a/t/cvs.t
+++ b/t/cvs.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More; my $total_tests = 37;
+use Test::More; my $total_tests = 40;
use IkiWiki;
my $default_test_methods = '^test_*';
@@ -163,7 +163,7 @@ sub test_rcs_add {
token => "moo",
);
is_newly_added("test0.mdwn");
-# is_in_keyword_substitution_mode("test0.mdwn", undef);
+ is_in_keyword_substitution_mode("test0.mdwn", undef);
my @changes = IkiWiki::rcs_recentchanges(3);
is_total_number_of_changes(\@changes, 1);
is_most_recent_change(\@changes, "test0", $message);
@@ -195,7 +195,7 @@ sub test_rcs_add {
token => "omo",
);
is_newly_added("$dir2/test1.mdwn");
-# is_in_keyword_substitution_mode("$dir2/test1.mdwn", undef);
+ is_in_keyword_substitution_mode("$dir2/test1.mdwn", undef);
@changes = IkiWiki::rcs_recentchanges(3);
is_total_number_of_changes(\@changes, 2);
is_most_recent_change(\@changes, "$dir2/test1", $message);
@@ -233,7 +233,7 @@ sub test_rcs_add {
IkiWiki::rcs_add($_) for ($file1, $file2);
IkiWiki::rcs_commit_staged(message => $message);
is_newly_added($_) for ($file1, $file2);
-# is_in_keyword_substitution_mode($file1, undef);
+ is_in_keyword_substitution_mode($file1, undef);
is_in_keyword_substitution_mode($file2, '-kb');
@changes = IkiWiki::rcs_recentchanges(3);
is_total_number_of_changes(\@changes, 3);
@@ -499,6 +499,7 @@ sub is_newly_added {
sub is_in_keyword_substitution_mode {
my ($file, $mode) = @_;
+ $mode = '(none)' unless defined $mode;
is(
IkiWiki::Plugin::cvs::cvs_info("Sticky Options", $file),
$mode,