Преглед на файлове

Port conf merge tests from old inigrep

Alois Mahdal преди 8 години
родител
ревизия
aee37c9111

+ 79
- 0
tests/saturnin-conf/TF_RUN Целия файл

@@ -0,0 +1,79 @@
1
+#!/bin/bash
2
+
3
+. "$TF_DIR/include/subtest.sh"
4
+. "$TF_DIR/include/tools.sh"
5
+
6
+. "$(shellfu-get path)" || tf_exit_error "failed to init shellfu"
7
+SHELLFU_PATH=$(satcmd --saturnin-get-shellfu-path)
8
+shellfu import saturnin  || tf_exit_error "failed to import saturnin"
9
+
10
+tf_enum_subtests() {
11
+    echo "merge_first"
12
+    echo "merge_first_no1"
13
+    echo "merge_first_no2"
14
+    echo "merge_first_no3"
15
+    echo "merge_first_none"
16
+    echo "merge_first_only1"
17
+    echo "merge_first_only2"
18
+    echo "merge_first_only3"
19
+    echo "merge_first_raw"
20
+    echo "merge_join"
21
+    echo "merge_join_no1"
22
+    echo "merge_join_no2"
23
+    echo "merge_join_no3"
24
+    echo "merge_join_only1"
25
+    echo "merge_join_only2"
26
+    echo "merge_join_only3"
27
+    echo "merge_join_none"
28
+    echo "merge_join_raw"
29
+}
30
+
31
+tf_do_subtest() {
32
+    local name=$1
33
+    local o_out="oracle/$name.stdout"
34
+    local o_es=0
35
+    local cmd
36
+    local t_paths
37
+    local t_args
38
+    case $name in
39
+        merge_first)
40
+            t_paths='test/merge-a:test/merge-b';              t_args='s1.k1 t.conf' ;;
41
+        merge_first_no1)
42
+            t_paths='test/merge-x:test/merge-a:test/merge-b'; t_args='s1.k1 t.conf' ;;
43
+        merge_first_no2)
44
+            t_paths='test/merge-a:test/merge-x:test/merge-b'; t_args='s1.k1 t.conf' ;;
45
+        merge_first_no3)
46
+            t_paths='test/merge-a:test/merge-b:test/merge-x'; t_args='s1.k1 t.conf' ;;
47
+        merge_first_none)
48
+            t_paths='test/merge-x:test/merge-y:test/merge-z'; t_args='s1.k1 t.conf'; o_es=1 ;;
49
+        merge_first_only1)
50
+            t_paths='test/merge-b:test/merge-x:test/merge-y'; t_args='s1.k1 t.conf' ;;
51
+        merge_first_only2)
52
+            t_paths='test/merge-x:test/merge-b:test/merge-y'; t_args='s1.k1 t.conf' ;;
53
+        merge_first_only3)
54
+            t_paths='test/merge-x:test/merge-y:test/merge-b'; t_args='s1.k1 t.conf' ;;
55
+        merge_first_raw)
56
+            t_paths='test/merge-a:test/merge-b';              t_args='-r s2.k2 t.conf' ;;
57
+        merge_join)
58
+            t_paths='test/merge-a:test/merge-b';              t_args='-j s1.k1 t.conf' ;;
59
+        merge_join_no1)
60
+            t_paths='test/merge-x:test/merge-a:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
61
+        merge_join_no2)
62
+            t_paths='test/merge-a:test/merge:x:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
63
+        merge_join_no3)
64
+            t_paths='test/merge-a:test/merge-b:test/merge:x'; t_args='-j s1.k1 t.conf' ;;
65
+        merge_join_none)
66
+            t_paths='test/merge-x:test/merge-y:test/merge-z'; t_args='-j s1.k1 t.conf'; o_es=1 ;;
67
+        merge_join_only1)
68
+            t_paths='test/merge-b:test/merge-x:test/merge-y'; t_args='-j s1.k1 t.conf' ;;
69
+        merge_join_only2)
70
+            t_paths='test/merge-x:test/merge-b:test/merge-y'; t_args='-j s1.k1 t.conf' ;;
71
+        merge_join_only3)
72
+            t_paths='test/merge-x:test/merge-y:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
73
+        merge_join_raw)
74
+            t_paths='test/merge-a:test/merge-b';              t_args='-j -r s2.k2 t.conf' ;;
75
+    esac
76
+    tf_testflt -n "$name" -O "$o_out" -S "$o_es" "SATURNIN_CONF_PATH=$t_paths saturnin__conf $t_args"
77
+}
78
+
79
+tf_do_subtests

+ 1
- 0
tests/saturnin-conf/oracle/merge_first.stdout Целия файл

@@ -0,0 +1 @@
1
+file-a-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_no1.stdout Целия файл

@@ -0,0 +1 @@
1
+file-a-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_no2.stdout Целия файл

@@ -0,0 +1 @@
1
+file-a-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_no3.stdout Целия файл

@@ -0,0 +1 @@
1
+file-a-s1k1

+ 0
- 0
tests/saturnin-conf/oracle/merge_first_none.stdout Целия файл


+ 1
- 0
tests/saturnin-conf/oracle/merge_first_only1.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_only2.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_only3.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_first_raw.stdout Целия файл

@@ -0,0 +1 @@
1
+ indented file-a-s2k2

+ 2
- 0
tests/saturnin-conf/oracle/merge_join.stdout Целия файл

@@ -0,0 +1,2 @@
1
+file-a-s1k1
2
+file-b-s1k1

+ 2
- 0
tests/saturnin-conf/oracle/merge_join_no1.stdout Целия файл

@@ -0,0 +1,2 @@
1
+file-a-s1k1
2
+file-b-s1k1

+ 2
- 0
tests/saturnin-conf/oracle/merge_join_no2.stdout Целия файл

@@ -0,0 +1,2 @@
1
+file-a-s1k1
2
+file-b-s1k1

+ 2
- 0
tests/saturnin-conf/oracle/merge_join_no3.stdout Целия файл

@@ -0,0 +1,2 @@
1
+file-a-s1k1
2
+file-b-s1k1

+ 0
- 0
tests/saturnin-conf/oracle/merge_join_none.stdout Целия файл


+ 1
- 0
tests/saturnin-conf/oracle/merge_join_only1.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_join_only2.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 1
- 0
tests/saturnin-conf/oracle/merge_join_only3.stdout Целия файл

@@ -0,0 +1 @@
1
+file-b-s1k1

+ 2
- 0
tests/saturnin-conf/oracle/merge_join_raw.stdout Целия файл

@@ -0,0 +1,2 @@
1
+ indented file-a-s2k2
2
+ indented file-b-s2k2

+ 10
- 0
tests/saturnin-conf/test/merge-a/t.conf Целия файл

@@ -0,0 +1,10 @@
1
+#   #
2
+# A #
3
+#   #
4
+
5
+[s1]
6
+    k1=file-a-s1k1
7
+    k2=file-a-s1k2
8
+[s2]
9
+    k1=file-a-s2k1
10
+    k2= indented file-a-s2k2

+ 10
- 0
tests/saturnin-conf/test/merge-b/t.conf Целия файл

@@ -0,0 +1,10 @@
1
+#   #
2
+# B #
3
+#   #
4
+
5
+[s1]
6
+    k1=file-b-s1k1
7
+    k2=file-b-s1k2
8
+[s2]
9
+    k1=file-b-s2k1
10
+    k2= indented file-b-s2k2