From 537e5b3c2ce7d5a7704b0fd91684f10b5d7f8aef Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 31 Jan 2015 00:23:03 -0800 Subject: [PATCH] Add more regression tests --- tests/tc004/expected.txt | 6 ++++++ tests/tc004/file.d | 2 ++ tests/tc004/run.sh | 5 +++++ tests/tc005/expected.txt | 2 ++ tests/tc005/file.d | 15 +++++++++++++++ tests/tc005/run.sh | 5 +++++ 6 files changed, 35 insertions(+) create mode 100644 tests/tc004/expected.txt create mode 100644 tests/tc004/file.d create mode 100755 tests/tc004/run.sh create mode 100644 tests/tc005/expected.txt create mode 100644 tests/tc005/file.d create mode 100755 tests/tc005/run.sh diff --git a/tests/tc004/expected.txt b/tests/tc004/expected.txt new file mode 100644 index 0000000..ce278d8 --- /dev/null +++ b/tests/tc004/expected.txt @@ -0,0 +1,6 @@ +identifiers +stdint M +stdio M +stdiobase M +stream M +string M diff --git a/tests/tc004/file.d b/tests/tc004/file.d new file mode 100644 index 0000000..029833c --- /dev/null +++ b/tests/tc004/file.d @@ -0,0 +1,2 @@ +import std.st +// Regression test for issue 178 diff --git a/tests/tc004/run.sh b/tests/tc004/run.sh new file mode 100755 index 0000000..29f3647 --- /dev/null +++ b/tests/tc004/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +dcd-client file.d -c13 > actual.txt +diff actual.txt expected.txt diff --git a/tests/tc005/expected.txt b/tests/tc005/expected.txt new file mode 100644 index 0000000..401f5db --- /dev/null +++ b/tests/tc005/expected.txt @@ -0,0 +1,2 @@ +identifiers +ABC c diff --git a/tests/tc005/file.d b/tests/tc005/file.d new file mode 100644 index 0000000..2d8e9da --- /dev/null +++ b/tests/tc005/file.d @@ -0,0 +1,15 @@ +import std.stdio; + +final abstract class ABC +{ + static @property bool mybool() + { + return true; + } +} + +void main(string[] s) +{ + while(!ABC.mybool) {} +} +// Regression test for issue 182 diff --git a/tests/tc005/run.sh b/tests/tc005/run.sh new file mode 100755 index 0000000..c639832 --- /dev/null +++ b/tests/tc005/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +dcd-client file.d -c154 > actual.txt +diff actual.txt expected.txt