]> git.gsnw.org Git - fping.git/commitdiff
more tests
authorDavid Schweikert <david@schweikert.ch>
Sun, 4 May 2014 19:22:28 +0000 (21:22 +0200)
committerDavid Schweikert <david@schweikert.ch>
Sun, 4 May 2014 19:22:28 +0000 (21:22 +0200)
ci/test-13-unknown-host.pl [new file with mode: 0755]

diff --git a/ci/test-13-unknown-host.pl b/ci/test-13-unknown-host.pl
new file mode 100755 (executable)
index 0000000..734bd09
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+use Test::Command tests => 6;
+
+# fping
+{
+my $cmd = Test::Command->new(cmd => "fping nosuchname.example.com");
+$cmd->exit_is_num(1);
+$cmd->stdout_is_eq("");
+$cmd->stderr_is_eq("nosuchname.example.com address not found\n");
+}
+
+# fping6
+{
+my $cmd = Test::Command->new(cmd => "fping6 nosuchname.example.com");
+$cmd->exit_is_num(1);
+$cmd->stdout_is_eq("");
+$cmd->stderr_is_eq("nosuchname.example.com: Name or service not known\n");
+}