-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunit-tests_test.bash
More file actions
executable file
·58 lines (32 loc) · 900 Bytes
/
unit-tests_test.bash
File metadata and controls
executable file
·58 lines (32 loc) · 900 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
source $BT_DIR/btest.bash
export BT_DEBUG=1
bt_begin btest_core 7
bt_declare "bt_ok function"
bt_ok_if [[ $BT_COUNT_OK -eq 1 ]]
bt_declare "bt_nok function"
bt_ok_if [[ $BT_COUNT_NOK -eq 1 ]]
bt_skip "Test skipped"
bt_declare "bt_skip function"
bt_ok_if [[ $BT_COUNT_SKIPPED -eq 1 ]]
bt_declare "bt_ok_if function 1"
bt_ok_if [[ 1 -eq 1 ]]
bt_declare "bt_ok_if function 2"
bt_ok_if [[ $BT_COUNT_OK -eq 3 ]]
bt_declare "bt_ok_fexists function1"
bt_call touch temp_test_file
bt_ok_fexists temp_test_file
bt_declare "bt_ok_fexists function2"
bt_call rm temp_test_file
bt_ok_if [[ $BT_COUNT_OK -eq 5 ]]
bt_end
bt_if true
bt_begin bt_if 1
bt_declare "bt_if function"
bt_ok_if [[ $BT_COUNT_OK -eq 0 ]]
bt_end
bt_ignore_if 0
bt_begin bt_ignore_if 1
bt_declare "bt_ignore_if function"
bt_ok_if [[ $BT_COUNT_OK -eq 0 ]]
bt_end