From 989501bec5475eaf1e914c54b5075ce21630da97 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 20 Aug 2015 03:50:45 -0700 Subject: [PATCH] Test cases for #244 --- tests/imports/a.d | 3 +++ tests/imports/b.d | 6 ++++++ tests/tc017/expected.txt | 4 ++++ tests/tc017/file.d | 3 +++ tests/tc017/run.sh | 5 +++++ 5 files changed, 21 insertions(+) create mode 100644 tests/imports/a.d create mode 100644 tests/imports/b.d create mode 100644 tests/tc017/expected.txt create mode 100644 tests/tc017/file.d create mode 100755 tests/tc017/run.sh diff --git a/tests/imports/a.d b/tests/imports/a.d new file mode 100644 index 0000000..0264baa --- /dev/null +++ b/tests/imports/a.d @@ -0,0 +1,3 @@ +module a; +public import b; +string FOO; diff --git a/tests/imports/b.d b/tests/imports/b.d new file mode 100644 index 0000000..31f1335 --- /dev/null +++ b/tests/imports/b.d @@ -0,0 +1,6 @@ +module b; +string BAR; + +struct S { + int x; +} diff --git a/tests/tc017/expected.txt b/tests/tc017/expected.txt new file mode 100644 index 0000000..585cd53 --- /dev/null +++ b/tests/tc017/expected.txt @@ -0,0 +1,4 @@ +identifiers +BAR v +FOO v +S s diff --git a/tests/tc017/file.d b/tests/tc017/file.d new file mode 100644 index 0000000..4bbe1e3 --- /dev/null +++ b/tests/tc017/file.d @@ -0,0 +1,3 @@ +module main; +import mod = a; +mod. diff --git a/tests/tc017/run.sh b/tests/tc017/run.sh new file mode 100755 index 0000000..5ffe242 --- /dev/null +++ b/tests/tc017/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client file.d -c33 > actual.txt +diff actual.txt expected.txt