summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-05-02 02:47:43 +0000
committerSteve Peters <steve@fisharerojo.org>2006-05-02 02:47:43 +0000
commit01d24961363e0071df30adb4d21737db6ba1878b (patch)
treeb06b33ff09ef3a62ff2067609514c96102645010 /lib
parente78c7d95b1afa16d50454952a650d0a02b7a4113 (diff)
downloadperl-01d24961363e0071df30adb4d21737db6ba1878b.tar.gz
Escape prompts with #'s to avoid causing tests to fail from
the unexpected output. p4raw-id: //depot/perl@28045
Diffstat (limited to 'lib')
-rw-r--r--lib/Module/Build/t/extend.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Module/Build/t/extend.t b/lib/Module/Build/t/extend.t
index 1983d79732..9a76851a32 100644
--- a/lib/Module/Build/t/extend.t
+++ b/lib/Module/Build/t/extend.t
@@ -230,20 +230,20 @@ print "Hello, World!\n";
$ENV{PERL_MM_USE_DEFAULT} = 1;
- eval{ $mb->y_n("Is this a question?") };
+ eval{ $mb->y_n("# Is this a question?") };
like $@, qr/ERROR:/, 'Do not allow default-less y_n() for unattended builds';
- eval{ $ans = $mb->prompt('Is this a question?') };
+ eval{ $ans = $mb->prompt('# Is this a question?') };
like $@, qr/ERROR:/, 'Do not allow default-less prompt() for unattended builds';
$ENV{PERL_MM_USE_DEFAULT} = 0;
- $ans = $mb->prompt('Is this a question?');
+ $ans = $mb->prompt('# Is this a question?');
print "\n"; # fake <enter> after input
is $ans, 'y', "prompt() doesn't require default for interactive builds";
- $ans = $mb->y_n('Say yes');
+ $ans = $mb->y_n('# Say yes');
print "\n"; # fake <enter> after input
ok $ans, "y_n() doesn't require default for interactive build";
@@ -251,13 +251,13 @@ print "Hello, World!\n";
# Test Defaults
*{Module::Build::_readline} = sub { '' };
- $ans = $mb->prompt("Is this a question");
+ $ans = $mb->prompt("# Is this a question");
is $ans, '', "default for prompt() without a default is ''";
- $ans = $mb->prompt("Is this a question", 'y');
+ $ans = $mb->prompt("# Is this a question", 'y');
is $ans, 'y', " prompt() with a default";
- $ans = $mb->y_n("Is this a question", 'y');
+ $ans = $mb->y_n("# Is this a question", 'y');
ok $ans, " y_n() with a default";
}