Skip to content

Commit 86ea984

Browse files
committed
test(sort): add test case for sort transitivity
1 parent d6543e3 commit 86ea984

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

test/case/021.sort.custom.bash

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
cleanup() {
4+
rm -f "$fs"/downloaded/*.tmp
5+
}
6+
7+
source "$root"/lib.bash
8+
9+
"$ghfs" -l 3003 -r "$fs"/vhost1 &
10+
sleep 0.05 # wait server ready
11+
cleanup
12+
13+
curl_get_body 'http://127.0.0.1:3003/' | grep -q -F 'go/"'
14+
if [ $? -ne 0 ]; then
15+
fail "unexpected url param for sort"
16+
fi
17+
18+
cleanup
19+
kill %1

test/case/022.sort.default.bash

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
cleanup() {
4+
rm -f "$fs"/downloaded/*.tmp
5+
}
6+
7+
source "$root"/lib.bash
8+
9+
"$ghfs" -l 3003 -r "$fs"/vhost1 &
10+
sleep 0.05 # wait server ready
11+
cleanup
12+
13+
curl_get_body 'http://127.0.0.1:3003/?sort=/N' | grep -q -F 'go/?sort=/N"'
14+
if [ $? -ne 0 ]; then
15+
fail "unexpected url param for sort"
16+
fi
17+
18+
cleanup
19+
kill %1

0 commit comments

Comments
 (0)