mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scstadmin: Add a test that causes scstadmin to display a prompt
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -22,7 +22,7 @@ BEGIN {
|
||||
unless(grep /blib/, @INC) {
|
||||
unshift(@INC, File::Spec->catdir($scstadmin_pm_dir, "lib"));
|
||||
}
|
||||
plan tests => 58;
|
||||
plan tests => 59;
|
||||
}
|
||||
|
||||
use Data::Dumper;
|
||||
@@ -134,6 +134,16 @@ sub run {
|
||||
return $res;
|
||||
}
|
||||
|
||||
# Trigger the scstadmin prompt() subroutine.
|
||||
sub testPrompt {
|
||||
my $result;
|
||||
|
||||
$result = <<'EOS';
|
||||
are you sure you wish to continue (y/[n]) ?
|
||||
EOS
|
||||
ok(run("$scstadmin -clear_config -force </dev/null"), $result);
|
||||
}
|
||||
|
||||
# Test the scstadmin -list_* options.
|
||||
sub listTest {
|
||||
my $result;
|
||||
@@ -607,6 +617,8 @@ setup($SCST);
|
||||
|
||||
attributeTest(File::Spec->catfile($testdir, "07-result.conf"));
|
||||
|
||||
testPrompt();
|
||||
|
||||
listTest();
|
||||
|
||||
teardown();
|
||||
|
||||
Reference in New Issue
Block a user