forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_basic.sh
More file actions
executable file
·40 lines (28 loc) · 781 Bytes
/
check_basic.sh
File metadata and controls
executable file
·40 lines (28 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
@INCLUDE_COMMON@
echo
echo ELEKTRA BASIC SCRIPTS TESTS
echo
check_version
OURS_ROOT=$USER_ROOT/mergetest/ours
THEIRS_ROOT=$USER_ROOT/mergetest/theirs
BASE_ROOT=$USER_ROOT/mergetest/base
MERGED_ROOT=$USER_ROOT/mergetest/merged
echo "Testing version"
if [ "x$CHECK_VERSION" != "xNO" ]; then
"$KDB" -V | grep KDB_VERSION | grep "$KDB_VERSION" > /dev/null
exit_if_fail "could not get correct version"
"$KDB" --version | grep KDB_VERSION | grep "$KDB_VERSION" > /dev/null
exit_if_fail "could not get correct version"
fi
echo "Testing invalid"
"$KDB" ls --ww > /dev/null
[ $? = 1 ]
exit_if_fail "invalid options"
"$KDB" ls x x x x > /dev/null
[ $? = 2 ]
exit_if_fail "invalid argument"
"$KDB" xx > /dev/null
[ $? = 4 ]
exit_if_fail "invalid command"
end_script