Pārlūkot izejas kodu

Update TFKit to version v0.0.7

Alois Mahdal 9 gadus atpakaļ
vecāks
revīzija
3c5cdf4daf

+ 1
- 1
utils/tfkit/include/harness.sh Parādīt failu

1
 #!/bin/bash
1
 #!/bin/bash
2
-# ffoo test harness
2
+# tfkit - Shellfu's movable test framework
3
 # See LICENSE file for copyright and license details.
3
 # See LICENSE file for copyright and license details.
4
 
4
 
5
 . "$TF_DIR/include/common.sh"
5
 . "$TF_DIR/include/common.sh"

+ 6
- 3
utils/tfkit/include/tools.sh Parādīt failu

10
     # Run a simple test for a unix filter
10
     # Run a simple test for a unix filter
11
     #
11
     #
12
     #     tf_testflt -n foo [-i foo.stdin] \
12
     #     tf_testflt -n foo [-i foo.stdin] \
13
-    #                [-O ffoo.stdout] [-E ffoo.stderr] [-S 3] \
13
+    #                [-O foo.stdout] [-E foo.stderr] [-S 3] \
14
     #                cmd arg...
14
     #                cmd arg...
15
     #
15
     #
16
     # Will drop *result/NAME.stdout* and *result/NAME.stderr* (intentionally
16
     # Will drop *result/NAME.stdout* and *result/NAME.stderr* (intentionally
28
     local o_es="0"              # oralce: exit status
28
     local o_es="0"              # oralce: exit status
29
     local r_out r_err r_es      # result: ^ ^ ^ those 3
29
     local r_out r_err r_es      # result: ^ ^ ^ those 3
30
 
30
 
31
+    local diff=diff
32
+    type colordiff >/dev/null 2>/dev/null && diff=colordiff
33
+
31
     # get args
34
     # get args
32
     #
35
     #
33
     local orig_args="$0 $*"
36
     local orig_args="$0 $*"
77
     # eval/report/exit
80
     # eval/report/exit
78
     #
81
     #
79
     test $r_es = $o_es || { tf_warn "bad exit status: $r_es (need $o_es)" ; t_es=$TF_ES_FAIL; }
82
     test $r_es = $o_es || { tf_warn "bad exit status: $r_es (need $o_es)" ; t_es=$TF_ES_FAIL; }
80
-    diff -u "$o_err" "$r_err" || t_es=$TF_ES_FAIL
81
-    diff -u "$o_out" "$r_out" || t_es=$TF_ES_FAIL
83
+    $diff -u "$o_err" "$r_err" || t_es=$TF_ES_FAIL
84
+    $diff -u "$o_out" "$r_out" || t_es=$TF_ES_FAIL
82
     return $t_es
85
     return $t_es
83
 }
86
 }

+ 2
- 2
utils/tfkit/runtests Parādīt failu

1
 #!/bin/bash
1
 #!/bin/bash
2
-# ffoo test framework
2
+# tfkit - Shellfu's movable test framework
3
 # See LICENSE file for copyright and license details.
3
 # See LICENSE file for copyright and license details.
4
 
4
 
5
-TF_VERSION="0.0.5"
5
+TF_VERSION="0.0.7"
6
 
6
 
7
 die() {
7
 die() {
8
     echo "$@" && exit 9
8
     echo "$@" && exit 9