From b0bbefa48bee91aee61f020306b3ac5ef54fe919 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 7 Jan 2016 21:10:19 -0800 Subject: [PATCH] Tests for doc comments --- tests/tc024/expected1.txt | 1 + tests/tc024/expected2.txt | 1 + tests/tc024/expected3.txt | 1 + tests/tc024/expected4.txt | 1 + tests/tc024/expected5.txt | 1 + tests/tc024/expected6.txt | 1 + tests/tc024/expected7.txt | 1 + tests/tc024/file.d | 30 ++++++++++++++++++++++++++++++ tests/tc024/run.sh | 23 +++++++++++++++++++++++ 9 files changed, 60 insertions(+) create mode 100644 tests/tc024/expected1.txt create mode 100644 tests/tc024/expected2.txt create mode 100644 tests/tc024/expected3.txt create mode 100644 tests/tc024/expected4.txt create mode 100644 tests/tc024/expected5.txt create mode 100644 tests/tc024/expected6.txt create mode 100644 tests/tc024/expected7.txt create mode 100644 tests/tc024/file.d create mode 100755 tests/tc024/run.sh diff --git a/tests/tc024/expected1.txt b/tests/tc024/expected1.txt new file mode 100644 index 0000000..dffc1b9 --- /dev/null +++ b/tests/tc024/expected1.txt @@ -0,0 +1 @@ +doc1\ndoc2 diff --git a/tests/tc024/expected2.txt b/tests/tc024/expected2.txt new file mode 100644 index 0000000..06fc133 --- /dev/null +++ b/tests/tc024/expected2.txt @@ -0,0 +1 @@ +doc1\ndoc3\ndoc3.5 diff --git a/tests/tc024/expected3.txt b/tests/tc024/expected3.txt new file mode 100644 index 0000000..73bd5ed --- /dev/null +++ b/tests/tc024/expected3.txt @@ -0,0 +1 @@ +doc1\ndoc4 diff --git a/tests/tc024/expected4.txt b/tests/tc024/expected4.txt new file mode 100644 index 0000000..2fe451e --- /dev/null +++ b/tests/tc024/expected4.txt @@ -0,0 +1 @@ +stuff\nwhat could go wrong? diff --git a/tests/tc024/expected5.txt b/tests/tc024/expected5.txt new file mode 100644 index 0000000..fc22d8f --- /dev/null +++ b/tests/tc024/expected5.txt @@ -0,0 +1 @@ +abc\ndef diff --git a/tests/tc024/expected6.txt b/tests/tc024/expected6.txt new file mode 100644 index 0000000..d6401cb --- /dev/null +++ b/tests/tc024/expected6.txt @@ -0,0 +1 @@ +documentation for g\nmore documentation for g diff --git a/tests/tc024/expected7.txt b/tests/tc024/expected7.txt new file mode 100644 index 0000000..2424abd --- /dev/null +++ b/tests/tc024/expected7.txt @@ -0,0 +1 @@ +test\nwhich comment is there? diff --git a/tests/tc024/file.d b/tests/tc024/file.d new file mode 100644 index 0000000..92d2fce --- /dev/null +++ b/tests/tc024/file.d @@ -0,0 +1,30 @@ +/** documentation for g */ +int g; /// more documentation for g + +/// test +alias cool = string; /// which comment is there? + +/// doc1 +int a, /// doc2 + b, /** doc3 */ /**doc3.5*/ + c; /// doc4 + +/** + * stuff + */ +int d; /** what could go wrong? */ + +/** abc */ +/** def */ +int e; + +unittest +{ + a; + b; + c; + d; + e; + g; + cool; +} diff --git a/tests/tc024/run.sh b/tests/tc024/run.sh new file mode 100755 index 0000000..e480213 --- /dev/null +++ b/tests/tc024/run.sh @@ -0,0 +1,23 @@ +set -e +set -u + +../../bin/dcd-client file.d -c286 -d > actual1.txt +diff actual1.txt expected1.txt + +../../bin/dcd-client file.d -c290 -d > actual2.txt +diff actual2.txt expected2.txt + +../../bin/dcd-client file.d -c294 -d > actual3.txt +diff actual3.txt expected3.txt + +../../bin/dcd-client file.d -c298 -d> actual4.txt +diff actual4.txt expected4.txt + +../../bin/dcd-client file.d -c302 -d> actual5.txt +diff actual5.txt expected5.txt + +../../bin/dcd-client file.d -c306 -d> actual6.txt +diff actual6.txt expected6.txt + +../../bin/dcd-client file.d -c313 -d> actual7.txt +diff actual7.txt expected7.txt