From 7977b8371a4a45a795c8b7f1c40964434c72c21f Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 15 Feb 2018 17:09:08 +0700 Subject: [PATCH] Test case for excluding missing module Setting the field modules as follows (modules (:standard \ foo)) where foo doesn't exist is an error. --- test/blackbox-tests/jbuild | 10 ++++++++++ .../test-cases/exclude-missing-module/jbuild | 3 +++ .../test-cases/exclude-missing-module/run.t | 4 ++++ 3 files changed, 17 insertions(+) create mode 100644 test/blackbox-tests/test-cases/exclude-missing-module/jbuild create mode 100644 test/blackbox-tests/test-cases/exclude-missing-module/run.t diff --git a/test/blackbox-tests/jbuild b/test/blackbox-tests/jbuild index e2ec9dac..e4e05d3d 100644 --- a/test/blackbox-tests/jbuild +++ b/test/blackbox-tests/jbuild @@ -358,3 +358,13 @@ (progn (run ${exe:cram.exe} run.t) (diff? run.t run.t.corrected))))))) + +(alias + ((name runtest) + (deps ((files_recursively_in test-cases/exclude-missing-module))) + (action + (chdir test-cases/exclude-missing-module + (setenv JBUILDER ${bin:jbuilder} + (progn + (run ${exe:cram.exe} run.t) + (diff? run.t run.t.corrected))))))) diff --git a/test/blackbox-tests/test-cases/exclude-missing-module/jbuild b/test/blackbox-tests/test-cases/exclude-missing-module/jbuild new file mode 100644 index 00000000..15366035 --- /dev/null +++ b/test/blackbox-tests/test-cases/exclude-missing-module/jbuild @@ -0,0 +1,3 @@ +(library + ((name foo) + (modules (:standard \ fake)))) diff --git a/test/blackbox-tests/test-cases/exclude-missing-module/run.t b/test/blackbox-tests/test-cases/exclude-missing-module/run.t new file mode 100644 index 00000000..7e863493 --- /dev/null +++ b/test/blackbox-tests/test-cases/exclude-missing-module/run.t @@ -0,0 +1,4 @@ + $ $JBUILDER build --display short --root . -j 1 + File "jbuild", line 1, characters 0-50: + Error: Module Fake doesn't exist. + [1]