add test case and update readme

This commit is contained in:
Basile Burg 2018-08-10 02:21:22 +02:00
parent 85da524224
commit 8ff220578c
6 changed files with 21 additions and 0 deletions

View File

@ -224,6 +224,12 @@ this, run the client with the -I option:
dcd-client -Ipath/to/imports dcd-client -Ipath/to/imports
## Remove import search path
Import paths can be removed from the server without restarting it. To accomplish
this, run the client with the -R option:
dcd-client -Rpath/to/imports
## Find declaration of symbol at cursor ## Find declaration of symbol at cursor

View File

@ -4,6 +4,7 @@ GREEN="\033[32m"
YELLOW="\033[33m" YELLOW="\033[33m"
NORMAL="\033[0m" NORMAL="\033[0m"
IMPORTS=$(pwd)/imports IMPORTS=$(pwd)/imports
export IMPORTS
fail_count=0 fail_count=0
pass_count=0 pass_count=0

View File

@ -0,0 +1,2 @@
identifiers
Point s

View File

View File

@ -0,0 +1 @@
import point:;

11
tests/tc_rm_import/run.sh Executable file
View File

@ -0,0 +1,11 @@
set -e
set -u
../../bin/dcd-client $1 file.d -c13 > actual1.txt
diff actual1.txt expected1.txt
../../bin/dcd-client $1 file.d -R$IMPORTS
../../bin/dcd-client $1 file.d -c13 > actual2.txt
diff actual2.txt expected2.txt
../../bin/dcd-client $1 -I$IMPORTS
../../bin/dcd-client $1 file.d -c13 > actual1.txt
diff actual1.txt expected1.txt