-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TESTS: Cleaned up filepath handling in quick-test.r, re-instated run-…
…test.r & updated quick-test docs
- Loading branch information
1 parent
86e048f
commit 5c61a62
Showing
3 changed files
with
114 additions
and
39 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
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,45 @@ | ||
REBOL [ | ||
Title: "Builds and Runs a single Red/System Tests" | ||
File: %run-test.r | ||
Author: "Peter W A Wood" | ||
Version: 0.7.0 | ||
License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" | ||
] | ||
|
||
|
||
;; include quick-test.r | ||
do %quick-test.r | ||
|
||
;; set the base dir for the test source | ||
qt/tests-dir: system/options/path | ||
|
||
print rejoin ["Quick-Test v" system/script/header/version] | ||
print rejoin ["Running under REBOL " system/version] | ||
|
||
;; get the name of the test file | ||
src: system/script/args | ||
|
||
either any [ | ||
(not find src ".r") and (not find src ".reds") | ||
not src: to-file src | ||
][ | ||
print "No valid test file supplied" | ||
][ | ||
print ["run-test src " src] | ||
either find src ".reds" [ | ||
;; compile & run reds pgm | ||
either exe: qt/compile src [ | ||
qt/run exe | ||
print qt/output | ||
][ | ||
print "Compile Error!!!" | ||
print qt/comp-output | ||
] | ||
][ | ||
;; copy and run rebol script | ||
qt/run-script src | ||
] | ||
] | ||
|
||
prin "" | ||
|