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:
Bart Van Assche
2019-02-18 01:29:40 +00:00
parent b79fa94a27
commit bf45a6162f

View File

@@ -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();