From e9156da20ec5332b1b53a6c44127e0f822891d16 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 23 Jan 2017 17:18:39 +0100 Subject: test suite for coq_makefile --- test-suite/coq-makefile/merlin1/_CoqProject | 10 ++++++++++ test-suite/coq-makefile/merlin1/run.sh | 13 +++++++++++++ test-suite/coq-makefile/merlin1/src/test.ml4 | 13 +++++++++++++ test-suite/coq-makefile/merlin1/src/test.mli | 0 test-suite/coq-makefile/merlin1/src/test_aux.ml | 1 + test-suite/coq-makefile/merlin1/src/test_aux.mli | 1 + test-suite/coq-makefile/merlin1/src/test_plugin.mlpack | 2 ++ test-suite/coq-makefile/merlin1/theories/test.v | 7 +++++++ 8 files changed, 47 insertions(+) create mode 100644 test-suite/coq-makefile/merlin1/_CoqProject create mode 100755 test-suite/coq-makefile/merlin1/run.sh create mode 100644 test-suite/coq-makefile/merlin1/src/test.ml4 create mode 100644 test-suite/coq-makefile/merlin1/src/test.mli create mode 100644 test-suite/coq-makefile/merlin1/src/test_aux.ml create mode 100644 test-suite/coq-makefile/merlin1/src/test_aux.mli create mode 100644 test-suite/coq-makefile/merlin1/src/test_plugin.mlpack create mode 100644 test-suite/coq-makefile/merlin1/theories/test.v (limited to 'test-suite/coq-makefile/merlin1') diff --git a/test-suite/coq-makefile/merlin1/_CoqProject b/test-suite/coq-makefile/merlin1/_CoqProject new file mode 100644 index 000000000..cb1ad4a4b --- /dev/null +++ b/test-suite/coq-makefile/merlin1/_CoqProject @@ -0,0 +1,10 @@ +-R src/ test +-R theories/ test +-I src + +src/test_plugin.mlpack +src/test.ml4 +src/test.mli +src/test_aux.ml +src/test_aux.mli +theories/test.v diff --git a/test-suite/coq-makefile/merlin1/run.sh b/test-suite/coq-makefile/merlin1/run.sh new file mode 100755 index 000000000..3b5d388c9 --- /dev/null +++ b/test-suite/coq-makefile/merlin1/run.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +#set -x +set -e + +export PATH=../../../bin/:$PATH +git clean -dfx . +coq_makefile -f _CoqProject -o Makefile +make .merlin +echo B $PWD/src > desired +echo S $PWD/src >> desired +tail -2 .merlin > actual +exec diff -u desired actual diff --git a/test-suite/coq-makefile/merlin1/src/test.ml4 b/test-suite/coq-makefile/merlin1/src/test.ml4 new file mode 100644 index 000000000..8ddc9b095 --- /dev/null +++ b/test-suite/coq-makefile/merlin1/src/test.ml4 @@ -0,0 +1,13 @@ +DECLARE PLUGIN "test_plugin" +let () = Mltop.add_known_plugin (fun () -> ()) "test_plugin";; + +VERNAC COMMAND EXTEND Test CLASSIFIED AS SIDEFF + | [ "Test" ] -> [ () ] +END + +TACTIC EXTEND test +| [ "test" ] -> [ Test_aux.tac ] +END + + + diff --git a/test-suite/coq-makefile/merlin1/src/test.mli b/test-suite/coq-makefile/merlin1/src/test.mli new file mode 100644 index 000000000..e69de29bb diff --git a/test-suite/coq-makefile/merlin1/src/test_aux.ml b/test-suite/coq-makefile/merlin1/src/test_aux.ml new file mode 100644 index 000000000..a01d0865a --- /dev/null +++ b/test-suite/coq-makefile/merlin1/src/test_aux.ml @@ -0,0 +1 @@ +let tac = Proofview.tclUNIT () diff --git a/test-suite/coq-makefile/merlin1/src/test_aux.mli b/test-suite/coq-makefile/merlin1/src/test_aux.mli new file mode 100644 index 000000000..10020f27d --- /dev/null +++ b/test-suite/coq-makefile/merlin1/src/test_aux.mli @@ -0,0 +1 @@ +val tac : unit Proofview.tactic diff --git a/test-suite/coq-makefile/merlin1/src/test_plugin.mlpack b/test-suite/coq-makefile/merlin1/src/test_plugin.mlpack new file mode 100644 index 000000000..cf94d851b --- /dev/null +++ b/test-suite/coq-makefile/merlin1/src/test_plugin.mlpack @@ -0,0 +1,2 @@ +Test_aux +Test diff --git a/test-suite/coq-makefile/merlin1/theories/test.v b/test-suite/coq-makefile/merlin1/theories/test.v new file mode 100644 index 000000000..7753b56aa --- /dev/null +++ b/test-suite/coq-makefile/merlin1/theories/test.v @@ -0,0 +1,7 @@ +Declare ML Module "test_plugin". +Test. +Goal True. +Proof. +test. +exact I. +Qed. -- cgit v1.2.3