diff options
| author | Gaëtan Gilbert | 2020-02-24 15:31:44 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2020-04-13 15:18:18 +0200 |
| commit | a2686239fa742bc761f003608f276a82a4c5cae7 (patch) | |
| tree | 2ce8d5dfb7014f1f22992e7070dadb71c24c5f5b | |
| parent | bd158b4e1a26a63778b256aaf059c8fe75f13467 (diff) | |
test partial import
| -rw-r--r-- | test-suite/success/PartialImport.v | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test-suite/success/PartialImport.v b/test-suite/success/PartialImport.v new file mode 100644 index 0000000000..8306d79352 --- /dev/null +++ b/test-suite/success/PartialImport.v @@ -0,0 +1,45 @@ +Module M. + + Definition a := 0. + Definition b := 1. + + Module N. + + Notation c := (a + b). + + End N. + +End M. + +Module Simple. + + Import M(a). + + Check a. + Fail Check b. + Fail Check N.c. + + (* todo output test: this prints a+M.b since the notation isn't imported *) + Check M.N.c. + + Fail Import M(c). + Fail Import M(M.b). + + Import M(N.c). + Check N.c. + (* interestingly prints N.c (also does with unfiltered Import M) *) + +End Simple. + +Module WithExport. + + Module X. + Export M(a, N.c). + End X. + + Import X. + Check a. + Check N.c. (* also prints N.c *) + Fail Check b. + +End WithExport. |
