|
|
@ -1,7 +1,7 @@ |
|
|
|
#!/usr/bin/expect |
|
|
|
|
|
|
|
set SUGAR_EXECUTABLE $::env(SUGAR_EXECUTABLE) |
|
|
|
set BUILD_NAME 005. |
|
|
|
set BUILD_NAME 006. |
|
|
|
|
|
|
|
proc abort {reason} { |
|
|
|
puts "test failed $reason" |
|
|
@ -20,6 +20,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE "fake_01.006.not_a_file" lex |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -32,6 +34,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE "fake_01.006.not_a_file" lex-all |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -44,6 +48,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE "tests/005/library.mol" lex merge |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -56,6 +62,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE merge |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -68,6 +76,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE parse |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -109,6 +119,8 @@ if {[file exists "/tmp/006.fake_target"]} { |
|
|
|
file delete "/tmp/006.fake_target" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE merge-all |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -133,6 +145,8 @@ if {$value == 0} { |
|
|
|
abort "compiler didn't crash" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE help |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
@ -145,6 +159,8 @@ if {$value != 0} { |
|
|
|
abort "compiler crashed displaying help" |
|
|
|
} |
|
|
|
|
|
|
|
# ------------------------------------------------------------------- |
|
|
|
|
|
|
|
spawn -noecho $SUGAR_EXECUTABLE --help |
|
|
|
expect { |
|
|
|
error { abort "failed to parse" } |
|
|
|