-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added test to confirm whether system_exec returns the return value …
…from a program that returns 15.
- Loading branch information
1 parent
3e93b93
commit 6bc0549
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int main() { | ||
return 15; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include std/unittest.e | ||
include std/filesys.e | ||
include std/io.e | ||
include std/utils.e | ||
|
||
constant full_cl = command_line() | ||
constant exe = full_cl[1] | ||
puts(1, exe & 10) | ||
constant build_dir = pathname(exe) | ||
puts(1, build_dir & 10) | ||
constant proposed_return15 = build_dir & SLASH & "return15.exe" | ||
puts(1,proposed_return15 & 10) | ||
constant return15_in_same_dir_as_eui = file_exists(proposed_return15) | ||
|
||
test_true("return15.exe was found", return15_in_same_dir_as_eui) | ||
constant return15exe = proposed_return15 | ||
test_equal("Program that returns 15", 15, system_exec( sprintf("..\\source\\build\\return15.exe", {}), 2 )) | ||
|
||
test_report() |