From 0112d4327b75307f73ce982f50ddc679fdc7fd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Tue, 20 Aug 2019 08:09:54 +0200 Subject: [PATCH] Add test for error case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- .../test-cases/exes-with-c/run.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/blackbox-tests/test-cases/exes-with-c/run.t b/test/blackbox-tests/test-cases/exes-with-c/run.t index e9bb46850116..070ab7542d5a 100644 --- a/test/blackbox-tests/test-cases/exes-with-c/run.t +++ b/test/blackbox-tests/test-cases/exes-with-c/run.t @@ -16,3 +16,22 @@ $ _build/default/bb.exe B + + $ mkdir err + $ touch err/foo.ml err/stubs.c + $ cat > err/dune << EOF + > (executable + > (name foo) + > (c_names stubs)) + > EOF + $ dune build --root err @all + Entering directory 'err' + Info: Creating file dune-project with this contents: + | (lang dune 2.0) + File "dune", line 1, characters 0-41: + 1 | (executable + 2 | (name foo) + 3 | (c_names stubs)) + Error: Pure bytecode executables cannot contain C stubs. + Did you forget to add `(modes exe)'? + [1]