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/joinrun.exp | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 test/arguments/joinrun.exp (limited to 'test/arguments/joinrun.exp') diff --git a/test/arguments/joinrun.exp b/test/arguments/joinrun.exp new file mode 100755 index 000000000..8e8570e4f --- /dev/null +++ b/test/arguments/joinrun.exp @@ -0,0 +1,91 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + + +send -- "firejail --name=joinrun\r" +sleep 2 + +spawn $env(SHELL) +send -- "./joinrun.sh\r" +expect { + timeout {puts "TESTING ERROR 3.1.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.1.2\n";exit} + "#arg1#" +} +expect { + timeout {puts "TESTING ERROR 3.1.3\n";exit} + "#arg2#" +} + +expect { + timeout {puts "TESTING ERROR 3.2.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.2.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 3.2.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 3.3.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.3.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 3.3.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 3.4.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.4.2\n";exit} + "#arg1 tail#" +} +expect { + timeout {puts "TESTING ERROR 3.4.3\n";exit} + "#arg2 tail#" +} + +expect { + timeout {puts "TESTING ERROR 3.5.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.5.2\n";exit} + "#arg1&tail#" +} +expect { + timeout {puts "TESTING ERROR 3.5.3\n";exit} + "#arg2&tail#" +} + +expect { + timeout {puts "TESTING ERROR 3.6.1\n";exit} + "Arguments:" +} +expect { + timeout {puts "TESTING ERROR 3.6.2\n";exit} + "#arg1&tail#" +} +expect { + timeout {puts "TESTING ERROR 3.6.3\n";exit} + "#arg2&tail#" +} + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2