summaryrefslogtreecommitdiffhomepage
path: root/systemtest/config
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-14 22:06:10 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-14 22:06:10 +0100
commit9e7f4c9d43b310c280cd6432cd4150411f4b914e (patch)
treec7be57a91602c228f05ff1cab2f186dcc6635733 /systemtest/config
parent009e450626194299ee4b5ccb8463ac64e127fde6 (diff)
Added system tests
Diffstat (limited to 'systemtest/config')
-rw-r--r--systemtest/config/unix.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/systemtest/config/unix.exp b/systemtest/config/unix.exp
index e69de29..2de93b0 100644
--- a/systemtest/config/unix.exp
+++ b/systemtest/config/unix.exp
@@ -0,0 +1,19 @@
+proc runtest_exit_code { test_name command_line exit_code } {
+
+ spawn $command_line
+
+ expect eof
+
+ lassign [wait] pid spawnid os_error_flag value
+
+ if {$os_error_flag == 0} {
+ if {$value == $exit_code} {
+ pass "$test_name: Returned expected value $value"
+ } else {
+ fail "$test_name: Returned bad value $value, expected: $exit_code"
+ }
+ } else {
+ fail "$test_name: errno: $value"
+ }
+
+}