File tree Expand file tree Collapse file tree 5 files changed +11
-3
lines changed
Expand file tree Collapse file tree 5 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,10 @@ sleep 0.05 # wait server ready
88file1=$( curl_get_body http://127.0.0.1:3003/file1.txt)
99assert " $file1 " ' vhost1/file1.txt'
1010
11+ (curl_get_body http://127.0.0.1:3003/hello | grep -q ' ./hello/index.txt' ) ||
12+ fail " resource /hello does not contains './hello/index.txt'"
13+
14+ (curl_get_body http://127.0.0.1:3003/hello/ | grep -q ' ./index.txt' ) ||
15+ fail " resource /hello/ does not contains './index.txt'"
16+
1117kill %1
Original file line number Diff line number Diff line change 1+ vhost1/file1-1.txt
Original file line number Diff line number Diff line change 1+ vhost1/file10.txt
Original file line number Diff line number Diff line change 1- vhost1/file1 .txt
1+ vhost1/file2 .txt
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ assert() {
44 expect=" $2 "
55 actual=" $1 "
66 if [ " $expect " != " $actual " ]; then
7- echo -e " $( basename $0 ) : expect \" \e[0;32m$expect \e[0m\" , got \" \e[1;31m$actual \e[0m\" " >&2
7+ echo -e " $( basename $0 ) :${BASH_LINENO[0]} expect \" \e[0;32m$expect \e[0m\" , got \" \e[1;31m$actual \e[0m\" " >&2
88 fi
99}
1010
1111fail () {
1212 msg=" $1 "
13- echo -e " $( basename $0 ) : \e[1;31m$msg \e[0m" >&2
13+ echo -e " $( basename $0 ) :${BASH_LINENO[0]} \e[1;31m$msg \e[0m" >&2
1414}
1515
1616curl_head_status () {
You can’t perform that action at this time.
0 commit comments