-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test cases for bugs spotted in MPR7873
This ensures that Topdirs.opt_directory works both in a compiled toplevel both when used interactively (GPR#1041 regression) and when called with a script argument (broken since the dawn of time)
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ exotic_lists.ml | |
pr6468.ml | ||
pr7060.ml | ||
pr7751.ml | ||
pr7873.ml | ||
strings.ml | ||
tracing.ml | ||
error_highlighting.ml |
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,26 @@ | ||
(* TEST | ||
files = "pr7873.sh" | ||
* setup-ocamlc.byte-build-env | ||
** script | ||
script = "mkdir hello" | ||
*** script | ||
script = "cp ${test_source_directory}/pr7873_hello.ml hello/hello.ml" | ||
**** ocamlc.byte | ||
module = "hello/hello.ml" | ||
***** ocamlc.byte | ||
module = "" | ||
program = "${test_build_directory}/mytop.exe" | ||
include ocamlcommon | ||
libraries += "ocamlbytecomp ocamltoplevel" | ||
flags = "-I hello" | ||
all_modules = "pr7873.ml hello.cmo topstart.cmo" | ||
****** script | ||
script = "sh ./pr7873.sh" | ||
******* check-program-output | ||
****** script | ||
script = "sh ./pr7873.sh direct" | ||
******* check-program-output | ||
reference = "${test_source_directory}/pr7873a.reference" | ||
*) | ||
|
||
let () = Topdirs.dir_directory "hello" |
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,2 @@ | ||
42- : unit = () | ||
|
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,9 @@ | ||
#!/bin/sh | ||
|
||
if [ $# -gt 0 ] ; then | ||
echo 'print_int Hello.hello' > test.ml | ||
${ocamlrun} ./mytop.exe -noinit -nostdlib -I ${ocamlsrcdir}/stdlib test.ml | ||
else | ||
echo 'print_int Hello.hello;;' | ${ocamlrun} ./mytop.exe -noinit -nostdlib -I ${ocamlsrcdir}/stdlib -no-version -noprompt | ||
fi | ||
exit 0 |
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 @@ | ||
let hello = 42 |
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 @@ | ||
42 |