From 9bdce655db6663010080549346a22876d68d844b Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 29 Aug 2015 03:32:56 -0700 Subject: [PATCH 1/3] Test case for #251 --- tests/tc020/expected1.txt | 2 ++ tests/tc020/file.d | 12 ++++++++++++ tests/tc020/run.sh | 5 +++++ 3 files changed, 19 insertions(+) create mode 100644 tests/tc020/expected1.txt create mode 100644 tests/tc020/file.d create mode 100755 tests/tc020/run.sh diff --git a/tests/tc020/expected1.txt b/tests/tc020/expected1.txt new file mode 100644 index 0000000..6f437c1 --- /dev/null +++ b/tests/tc020/expected1.txt @@ -0,0 +1,2 @@ +calltips +this(int[] array, int*[] arrayOfPointers, int* pointer, int plain) diff --git a/tests/tc020/file.d b/tests/tc020/file.d new file mode 100644 index 0000000..138e0f7 --- /dev/null +++ b/tests/tc020/file.d @@ -0,0 +1,12 @@ +struct TestStruct +{ + int[] array; + int*[] arrayOfPointers; + int* pointer; + int plain; +} + +unittest +{ + auto ts = TestStruct( +} diff --git a/tests/tc020/run.sh b/tests/tc020/run.sh new file mode 100755 index 0000000..2919cb5 --- /dev/null +++ b/tests/tc020/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client file.d -c122 > actual1.txt +diff actual1.txt expected1.txt From e6f3160d908d6a3becb62d2758d5dc2d4ababf00 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 29 Aug 2015 03:42:13 -0700 Subject: [PATCH 2/3] Use CI status for the master branch instead of whatever was the most recent --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c4c6ab..39c41ea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DCD [![CI status](https://travis-ci.org/Hackerpilot/DCD.svg)](https://travis-ci.org/Hackerpilot/DCD/) +# DCD [![CI status](https://travis-ci.org/Hackerpilot/DCD.svg?branch=master)](https://travis-ci.org/Hackerpilot/DCD/) The D Completion Daemon is an auto-complete program for the D programming language. ![Teaser](teaser.png "This is what the future looks like - Jayce, League of Legends") From 954989bf63a675ea84ae8d6aadecac6ec80f08af Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 29 Aug 2015 18:16:14 -0700 Subject: [PATCH 3/3] Fix #251 --- dsymbol | 2 +- tests/tc020/expected2.txt | 0 tests/tc020/file.d | 11 +++++++++++ tests/tc020/run.sh | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tests/tc020/expected2.txt diff --git a/dsymbol b/dsymbol index e0d4828..c9ac0cb 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit e0d4828006b258c1d25a421677fc8527bd766a05 +Subproject commit c9ac0cbf1a4496c2c015829bf08fd96c08c53ff7 diff --git a/tests/tc020/expected2.txt b/tests/tc020/expected2.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/tc020/file.d b/tests/tc020/file.d index 138e0f7..b166374 100644 --- a/tests/tc020/file.d +++ b/tests/tc020/file.d @@ -6,7 +6,18 @@ struct TestStruct int plain; } +class TestClass +{ + int a; + int b; +} + unittest { auto ts = TestStruct( } + +unittest +{ + auto tc = new TestClass( +} diff --git a/tests/tc020/run.sh b/tests/tc020/run.sh index 2919cb5..8751e55 100755 --- a/tests/tc020/run.sh +++ b/tests/tc020/run.sh @@ -1,5 +1,8 @@ set -e set -u -../../bin/dcd-client file.d -c122 > actual1.txt +../../bin/dcd-client file.d -c159 > actual1.txt diff actual1.txt expected1.txt + +../../bin/dcd-client file.d -c199 > actual2.txt +diff actual2.txt expected2.txt