diff options
author | Thomas Habets <thomas@habets.se> | 2014-05-16 16:26:46 +0100 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2014-05-16 16:27:40 +0100 |
commit | 40eaa255c28ed133a257fb15690a660570ac43ed (patch) | |
tree | cf88d82ab40222769a7e7e52e51314d323855f7b | |
parent | fd59fb9bbd57d36028a888f8177c5473c821b175 (diff) | |
download | arping-40eaa255c28ed133a257fb15690a660570ac43ed.tar.gz |
Add tests for usage text.
-rwxr-xr-x | extra/testing.ex | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/extra/testing.ex b/extra/testing.ex index 301d0df..6b6a9f2 100755 --- a/extra/testing.ex +++ b/extra/testing.ex @@ -18,7 +18,7 @@ # * -c # * -D # * -e -# * -h (soon) +# * -h # * -q (soon) # * -r (soon) # * -R (soon) @@ -44,6 +44,40 @@ set bin [lindex $argv 0] set ip [lindex $argv 1] set mac [lindex $argv 2] +send_user -- "--------------- No options ------------------\n" +spawn $bin +expect -re "ARPing 2\.\d+, by Thomas Habets <thomas@habets.se>\r +usage: arping \\\[ -0aAbdDeFpqrRuUv \\\] \\\[ -w <us> \\\] \\\[ -S <host/ip> \\\]\r +\\\[ -T <host/ip \\\] \\\[ -s <MAC> \\\] \\\[ -t <MAC> \\\] \\\[ -c <count> \\\]\r +\\\[ -i <interface> \\\] <host/ip/MAC | -B>\r +For complete usage info, use --help or check the manpage.\r +" +expect eof + +send_user -- "--------------- -h ------------------\n" +spawn $bin -h +expect -re "ARPing 2\.\d+, by Thomas Habets <thomas@habets.se>\r +usage: arping \\\[ -0aAbdDeFpqrRuUv \\\] \\\[ -w <us> \\\] \\\[ -S <host/ip> \\\]\r +\\\[ -T <host/ip \\\] \\\[ -s <MAC> \\\] \\\[ -t <MAC> \\\] \\\[ -c <count> \\\]\r +\\\[ -i <interface> \\\] <host/ip/MAC | -B>\r +For complete usage info, use --help or check the manpage.\r +" +expect eof + +send_user -- "--------------- --help ------------------\n" +spawn $bin --help +expect -re "ARPing 2\.\d+, by Thomas Habets <thomas@habets.se>\r +usage: arping \\\[ -0aAbdDeFpqrRuUv \\\] \\\[ -w <us> \\\] \\\[ -S <host/ip> \\\]\r +\\\[ -T <host/ip \\\] \\\[ -s <MAC> \\\] \\\[ -t <MAC> \\\] \\\[ -c <count> \\\]\r +\\\[ -i <interface> \\\] <host/ip/MAC | -B>\r +\r +" +expect "Report bugs to: thomas@habets.se\r +Arping home page: <http://www.habets.pp.se/synscan/>\r +Development repo: http://github.com/ThomasHabets/arping\r +" +expect eof + send_user -- "--------------- Ping IP Simple ------------------\n" spawn $bin -c 1 $ip expect -re "ARPING $ip\r |