From 23bd0c41457262e7ef5223a187e3c15e44be039c Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 25 Jul 2016 12:29:00 -0400 Subject: argument subsystem testing framework --- test/arguments/bashrun.exp | 86 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 test/arguments/bashrun.exp (limited to 'test/arguments/bashrun.exp') diff --git a/test/arguments/bashrun.exp b/test/arguments/bashrun.exp new file mode 100755 index 000000000..a3c9e382d --- /dev/null +++ b/test/arguments/bashrun.exp @@ -0,0 +1,86 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "./bashrun.sh\r" +expect { + timeout {puts "TESTING ERROR 1.1.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.1.2\n";exit} + "#arg1#" +} +expect { + timeout {puts "TESTING ERROR 1.1.3\n";exit} + "#arg2#" +} + +expect { + timeout {puts "TESTING ERROR 1.2.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.2.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 1.2.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 1.3.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.3.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 1.3.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 1.4.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.4.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 1.4.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 1.5.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.5.2\n";exit} + "#arg1&tail#" +} +expect { + timeout {puts "TESTING ERROR 1.5.3\n";exit} + "#arg2&tail#" +} + +expect { + timeout {puts "TESTING ERROR 1.6.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 1.6.2\n";exit} + "#arg1&tail#" +} +expect { + timeout {puts "TESTING ERROR 1.6.3\n";exit} + "#arg2&tail#" +} + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2