From 6ecc8ffd7caffb11a501b9d0b1da84f55da4f3f9 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Jun 2016 02:33:07 +0200 Subject: [PATCH] Added test case --- tests/tc033/bar.d | 3 +++ tests/tc033/expected1.txt | 2 ++ tests/tc033/expected2.txt | 2 ++ tests/tc033/file.d | 3 +++ tests/tc033/run.sh | 10 ++++++++++ 5 files changed, 20 insertions(+) create mode 100644 tests/tc033/bar.d create mode 100644 tests/tc033/expected1.txt create mode 100644 tests/tc033/expected2.txt create mode 100644 tests/tc033/file.d create mode 100755 tests/tc033/run.sh diff --git a/tests/tc033/bar.d b/tests/tc033/bar.d new file mode 100644 index 0000000..4ec195e --- /dev/null +++ b/tests/tc033/bar.d @@ -0,0 +1,3 @@ +module tc033.bar; + +void fooBarFunc() {} \ No newline at end of file diff --git a/tests/tc033/expected1.txt b/tests/tc033/expected1.txt new file mode 100644 index 0000000..a48220d --- /dev/null +++ b/tests/tc033/expected1.txt @@ -0,0 +1,2 @@ +identifiers +bar M diff --git a/tests/tc033/expected2.txt b/tests/tc033/expected2.txt new file mode 100644 index 0000000..fe208d3 --- /dev/null +++ b/tests/tc033/expected2.txt @@ -0,0 +1,2 @@ +identifiers +fooBarFunc f diff --git a/tests/tc033/file.d b/tests/tc033/file.d new file mode 100644 index 0000000..6f11233 --- /dev/null +++ b/tests/tc033/file.d @@ -0,0 +1,3 @@ +import tc033.bar; + +void main() { fooBarF } \ No newline at end of file diff --git a/tests/tc033/run.sh b/tests/tc033/run.sh new file mode 100755 index 0000000..83844db --- /dev/null +++ b/tests/tc033/run.sh @@ -0,0 +1,10 @@ +set -e +set -u + +../../bin/dcd-client $1 -I bar.d + +../../bin/dcd-client $1 file.d -c 15 | sed s\""$(dirname "$(pwd)")"\"\" > actual1.txt +diff actual1.txt expected1.txt + +../../bin/dcd-client $1 file.d -c 40 | sed s\""$(dirname "$(pwd)")"\"\" > actual2.txt +diff actual2.txt expected2.txt