From 91a973cba9be250d377db9ed8d22fb7b127e6eb4 Mon Sep 17 00:00:00 2001 From: RUSshy <18348637+RUSshy@users.noreply.github.com> Date: Tue, 31 Aug 2021 16:07:30 +0200 Subject: [PATCH] Added test --- tests/tc_auto_variable/expected.txt | 4 ++++ tests/tc_auto_variable/file.d | 1 + tests/tc_auto_variable/run.sh | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 tests/tc_auto_variable/expected.txt create mode 100644 tests/tc_auto_variable/file.d create mode 100644 tests/tc_auto_variable/run.sh diff --git a/tests/tc_auto_variable/expected.txt b/tests/tc_auto_variable/expected.txt new file mode 100644 index 0000000..d2d54ce --- /dev/null +++ b/tests/tc_auto_variable/expected.txt @@ -0,0 +1,4 @@ +identifiers +data v MyData want stdin 56 +dchar k +double k diff --git a/tests/tc_auto_variable/file.d b/tests/tc_auto_variable/file.d new file mode 100644 index 0000000..1e01168 --- /dev/null +++ b/tests/tc_auto_variable/file.d @@ -0,0 +1 @@ +struct MyData{} MyData want() { return MyData(); } auto data = want(); d \ No newline at end of file diff --git a/tests/tc_auto_variable/run.sh b/tests/tc_auto_variable/run.sh new file mode 100644 index 0000000..dcd406e --- /dev/null +++ b/tests/tc_auto_variable/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 --extended file.d -c72 > actual.txt +diff actual.txt expected.txt