Browse Source

Rename ini.iniread to config.cfgrep

config.cfgrep does better job at hinting how the function works
(i.e. somehow similar to UNIX grep) and that the use is not limited to
INI files.

Also default config file suffix is now "conf".
Alois Mahdal 10 years ago
parent
commit
f462b7c330
47 changed files with 86 additions and 85 deletions
  1. 5
    5
      doc/ffoo.3.sh
  2. 30
    30
      include/config.sh
  3. 2
    1
      include/misc.sh
  4. 7
    7
      test/data/ffoo_api/functions.oracle
  5. 1
    1
      test/data/ffoo_api/modules.oracle
  6. 1
    1
      test/data/ini_iniread/both_keys_and_sections
  7. 1
    1
      test/data/ini_iniread/games_with_spaces
  8. 1
    1
      test/data/ini_iniread/keys_only
  9. 1
    1
      test/data/ini_iniread/keys_sections_spaces
  10. 1
    1
      test/data/ini_iniread/list_keys
  11. 1
    1
      test/data/ini_iniread/list_paths
  12. 1
    1
      test/data/ini_iniread/list_sections
  13. 0
    0
      test/data/ini_iniread/merge-a/t.conf
  14. 0
    0
      test/data/ini_iniread/merge-b/t.conf
  15. 1
    1
      test/data/ini_iniread/merge_first
  16. 1
    1
      test/data/ini_iniread/merge_first.env
  17. 1
    1
      test/data/ini_iniread/merge_first_no1
  18. 1
    1
      test/data/ini_iniread/merge_first_no1.env
  19. 1
    1
      test/data/ini_iniread/merge_first_no2
  20. 1
    1
      test/data/ini_iniread/merge_first_no2.env
  21. 1
    1
      test/data/ini_iniread/merge_first_no3
  22. 1
    1
      test/data/ini_iniread/merge_first_no3.env
  23. 1
    1
      test/data/ini_iniread/merge_first_none
  24. 1
    1
      test/data/ini_iniread/merge_first_none.env
  25. 1
    1
      test/data/ini_iniread/merge_first_strict
  26. 1
    1
      test/data/ini_iniread/merge_first_strict.env
  27. 1
    1
      test/data/ini_iniread/merge_join
  28. 1
    1
      test/data/ini_iniread/merge_join.env
  29. 1
    1
      test/data/ini_iniread/merge_join_no1
  30. 1
    1
      test/data/ini_iniread/merge_join_no1.env
  31. 1
    1
      test/data/ini_iniread/merge_join_no2
  32. 1
    1
      test/data/ini_iniread/merge_join_no2.env
  33. 1
    1
      test/data/ini_iniread/merge_join_no3
  34. 1
    1
      test/data/ini_iniread/merge_join_no3.env
  35. 1
    1
      test/data/ini_iniread/merge_join_none
  36. 1
    1
      test/data/ini_iniread/merge_join_none.env
  37. 1
    1
      test/data/ini_iniread/merge_join_strict
  38. 1
    1
      test/data/ini_iniread/merge_join_strict.env
  39. 2
    2
      test/data/ini_iniread/merge_join_strict.oracle
  40. 1
    1
      test/data/ini_iniread/path
  41. 1
    1
      test/data/ini_iniread/plain
  42. 1
    1
      test/data/ini_iniread/plain_strict
  43. 1
    1
      test/data/ini_iniread/sections_only
  44. 1
    1
      test/data/ini_iniread/strict_and_space
  45. 1
    1
      test/data/ini_iniread/strict_and_tab
  46. 1
    1
      test/data/ini_iniread/tricks_with_strange_naming
  47. 1
    1
      test/scripts/ini_iniread

+ 5
- 5
doc/ffoo.3.sh View File

@@ -29,7 +29,7 @@ myfun                               # debug:myfun: num='42'
29 29
 #
30 30
 mkdir $HOME/.cfg
31 31
 cat >$HOME/.cfg/foo.ini <<EOF
32
-# a sample ini file
32
+# a sample INI file
33 33
 [foo]
34 34
     multiline = also possible
35 35
     multiline = like this :)
@@ -41,8 +41,8 @@ cat >$HOME/.cfg/foo.ini <<EOF
41 41
     s1 =def main():
42 42
     s1 =    print "will work!"
43 43
 EOF
44
-ffoo import ini
45
-FFOO_INI_PATH=$HOME/.cfg
44
+ffoo import config
45
+FFOO_CONFIG_PATH=$HOME/.cfg
46 46
 iniread -s foo.bar -k baz foo.ini       # prints "qux"
47 47
 iniread -p foo.bar.baz foo.ini          # ...short for above
48 48
 iniread -p foo.bar.baz                  # ...even shorter
@@ -51,7 +51,7 @@ python s1.py                            # << will work
51 51
 
52 52
 
53 53
 #
54
-# including runtime ini merging
54
+# including runtime INI merging
55 55
 #
56 56
 mkdir $HOME/.cfg/private
57 57
 cat >$HOME/.cfg/private/foo.ini <<EOF
@@ -61,7 +61,7 @@ cat >$HOME/.cfg/private/foo.ini <<EOF
61 61
 # this approach can make it easier
62 62
 # to sync private info separately
63 63
 EOF
64
-FFOO_INI_PATH=$HOME/.cfg:$HOME/.cfg-private
64
+FFOO_CONFIG_PATH=$HOME/.cfg:$HOME/.cfg-private
65 65
 iniread    -p foo.bar.baz2              # merges both paths -- prints 2 lines
66 66
 iniread -1 -p foo.bar.baz2              # ... last one wins -- prints "secret..."
67 67
 iniread -S foo.ini                      # merges both files verbatim

include/ini.sh → include/config.sh View File

@@ -6,26 +6,26 @@ ffoo import core
6 6
 #
7 7
 # Expected filename extension (for guessing from -p path head)
8 8
 #
9
-# If no filename to read is given, iniread will guess filename
10
-# as the path head plus this suffix (e.g. `foo.ini` for
11
-# `iniread -p foo.bar.baz`)
9
+# If no filename to read is given, cfgrep will guess filename
10
+# as the path head plus this suffix (e.g. `foo.conf` for
11
+# `cfgrep -p foo.bar.baz`)
12 12
 #
13
-FFOO_INI_SUFFIX=".ini"
13
+FFOO_CONFIG_SUFFIX=".conf"
14 14
 
15 15
 
16
-__iniread__cat() {
16
+__cfgrep__cat() {
17 17
     # cat without starting a process
18 18
     while IFS= read line;
19 19
     do echos "$line"; done
20 20
 }
21 21
 
22 22
 
23
-__initead_fltcmt() {
23
+__cfgrep__fltcmt() {
24 24
     grep -v -e "^[[:space:]]*[#;]" -e "^[[:space:]]*$"
25 25
 }
26 26
 
27 27
 
28
-__iniread__fltkey() {
28
+__cfgrep__fltkey() {
29 29
     # filter values from key=value pair
30 30
     local line
31 31
     local key
@@ -48,7 +48,7 @@ __iniread__fltkey() {
48 48
 }
49 49
 
50 50
 
51
-__iniread__fltsct() {
51
+__cfgrep__fltsct() {
52 52
     # filter per section
53 53
     local sct_ok=false
54 54
     local line
@@ -69,7 +69,7 @@ __iniread__fltsct() {
69 69
 }
70 70
 
71 71
 
72
-__iniread__merge() {
72
+__cfgrep__merge() {
73 73
     local path
74 74
     debug -v strategy
75 75
     while read path;
@@ -95,12 +95,12 @@ __iniread__merge() {
95 95
 }
96 96
 
97 97
 
98
-__iniread__load() {
98
+__cfgrep__load() {
99 99
     if test -z "$1";
100 100
     then                # guess filename from section head
101
-        local guess="$(cut -d. -f1 <<<"$wntsct")$FFOO_INI_SUFFIX"
101
+        local guess="$(cut -d. -f1 <<<"$wntsct")$FFOO_CONFIG_SUFFIX"
102 102
         debug -v guess
103
-        __iniread__load "$guess"
103
+        __cfgrep__load "$guess"
104 104
     fi
105 105
     local arg trydir trypath
106 106
     for arg in "$@";
@@ -111,8 +111,8 @@ __iniread__load() {
111 111
                 cat "$arg"
112 112
             ;;
113 113
         *)              # name given, find all its incarnations
114
-            debug -v FFOO_INI_PATH
115
-            echos "$FFOO_INI_PATH" \
114
+            debug -v FFOO_CONFIG_PATH
115
+            echos "$FFOO_CONFIG_PATH" \
116 116
               | tr ':' '\n' \
117 117
               | while read trydir;
118 118
                 do
@@ -121,7 +121,7 @@ __iniread__load() {
121 121
                     debug -v trypath
122 122
                     echos "$trypath"
123 123
                 done \
124
-              |  __iniread__merge
124
+              |  __cfgrep__merge
125 125
             ;;
126 126
         esac
127 127
     done
@@ -129,13 +129,13 @@ __iniread__load() {
129 129
 }
130 130
 
131 131
 
132
-iniread() {
132
+cfgrep() {
133 133
     #
134
-    # A flexible (not just) .ini file reader
134
+    # A flexible (not just) .conf/.ini file reader
135 135
     #
136 136
     # Usage:
137
-    #   iniread [-S] [-1] [-j] [-s section] [-k key] [file...]
138
-    #   iniread [-S] [-1] [-j] [-p path] [file...]
137
+    #   cfgrep [-S] [-1] [-j] [-s section] [-k key] [file...]
138
+    #   cfgrep [-S] [-1] [-j] [-p path] [file...]
139 139
     #
140 140
     #
141 141
     # Selection
@@ -179,11 +179,11 @@ iniread() {
179 179
     #     path.
180 180
     #
181 181
     #  *  Otherwise, it is taken as filename and searched for
182
-    #     in directories given in `$FFOO_INI_PATH`.  (This can
182
+    #     in directories given in `$FFOO_CONFIG_PATH`.  (This can
183 183
     #     yield more than one path, which is equivalent as if
184 184
     #     all paths were provided.)
185 185
     #
186
-    #     Not all files expanded based on `$FFOO_INI_PATH`
186
+    #     Not all files expanded based on `$FFOO_CONFIG_PATH`
187 187
     #     are read by default; reading is governed by "merge
188 188
     #     strategy": the default strategy "first" reads only
189 189
     #     the first existing file.  "join" strategy means
@@ -200,7 +200,7 @@ iniread() {
200 200
     # Without *file* given at all, same procedure is used as in
201 201
     # case of filename without slash, except that *file* argument
202 202
     # is inferred by taking part of section name before first
203
-    # dot and adding `$FFOO_INI_SUFFIX`, (".ini" by default).
203
+    # dot and adding `$FFOO_CONFIG_SUFFIX`, (".conf" by default).
204 204
     # This allows for creating relatively rich config value
205 205
     # structure it divided in several files (e.g. by component)
206 206
     # but accessing them with as little typing as possible.
@@ -228,18 +228,18 @@ iniread() {
228 228
         first|join)                                   : ;;
229 229
         *) warn "invalid merge strategy: $strategy"; return 2 ;;
230 230
     esac
231
-    fltsct=__iniread__cat
232
-    fltkey=__iniread__cat
233
-    fltcmt=__initead_fltcmt
234
-    limit_line=__iniread__cat
235
-    test -n "$wntsct" && fltsct=__iniread__fltsct
236
-    test -n "$wntkey" && fltkey=__iniread__fltkey
231
+    fltsct=__cfgrep__cat
232
+    fltkey=__cfgrep__cat
233
+    fltcmt=__cfgrep__fltcmt
234
+    limit_line=__cfgrep__cat
235
+    test -n "$wntsct" && fltsct=__cfgrep__fltsct
236
+    test -n "$wntkey" && fltkey=__cfgrep__fltkey
237 237
     $one_line && limit_line="tail -1"
238 238
     $strict && grepex=""
239
-    $strict && fltcmt=__iniread__cat
239
+    $strict && fltcmt=__cfgrep__cat
240 240
     debug -v wntkey wntsct
241 241
     debug "\$@='$@'"
242
-    __iniread__load "$@" \
242
+    __cfgrep__load "$@" \
243 243
         | $fltcmt \
244 244
         | $fltsct \
245 245
         | $fltkey \

+ 2
- 1
include/misc.sh View File

@@ -1,6 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3 3
 ffoo import core
4
+ffoo import config
4 5
 
5 6
 
6 7
 append_if_missing() {
@@ -60,7 +61,7 @@ mute_known() {
60 61
     # For those yums and rpms that don't know theit manners.
61 62
     # Use with care!
62 63
     #
63
-    grep -vxf <(iniread -s mute -k $1 mute.ini)
64
+    grep -vxf <(cfgrep -s mute -k $1 mute.conf)
64 65
 }
65 66
 
66 67
 

+ 7
- 7
test/data/ffoo_api/functions.oracle View File

@@ -1,4 +1,11 @@
1 1
 charmenu.charmenu
2
+config.__cfgrep__cat
3
+config.__cfgrep__fltcmt
4
+config.__cfgrep__fltkey
5
+config.__cfgrep__fltsct
6
+config.__cfgrep__load
7
+config.__cfgrep__merge
8
+config.cfgrep
2 9
 core.__cat
3 10
 core.__cut_stack
4 11
 core.__echo
@@ -17,13 +24,6 @@ core.think
17 24
 core.usage_is
18 25
 core.warn
19 26
 exit.exits
20
-ini.__iniread__cat
21
-ini.__iniread__fltkey
22
-ini.__iniread__fltsct
23
-ini.__iniread__load
24
-ini.__iniread__merge
25
-ini.__initead_fltcmt
26
-ini.iniread
27 27
 misc.append_if_missing
28 28
 misc.collapse_tilde
29 29
 misc.echo_hr

+ 1
- 1
test/data/ffoo_api/modules.oracle View File

@@ -1,7 +1,7 @@
1 1
 charmenu
2
+config
2 3
 core
3 4
 exit
4
-ini
5 5
 misc
6 6
 mkpretty
7 7
 mkpretty_color

+ 1
- 1
test/data/ini_iniread/both_keys_and_sections View File

@@ -1,5 +1,5 @@
1 1
 # desc: both keys and section
2
-# cmd: iniread -s section1 -k key1
2
+# cmd: cfgrep -s section1 -k key1
3 3
 
4 4
 [section1]
5 5
 free form in s1

+ 1
- 1
test/data/ini_iniread/games_with_spaces View File

@@ -1,5 +1,5 @@
1 1
 # desc: games with spaces
2
-# cmd: iniread -s "maybe spaced" -k "spaced key"
2
+# cmd: cfgrep -s "maybe spaced" -k "spaced key"
3 3
 
4 4
 [maybe spaced]
5 5
 spaced key=value00000

+ 1
- 1
test/data/ini_iniread/keys_only View File

@@ -1,5 +1,5 @@
1 1
 # desc: keys only's
2
-# cmd: iniread -k key1 ''
2
+# cmd: cfgrep -k key1 ''
3 3
 
4 4
 free form
5 5
 key1=value1

+ 1
- 1
test/data/ini_iniread/keys_sections_spaces View File

@@ -1,5 +1,5 @@
1 1
 # desc: keys, sections and spaces
2
-# cmd: iniread -s section1 -k key1
2
+# cmd: cfgrep -s section1 -k key1
3 3
 
4 4
 [section1]
5 5
     free form in s1

+ 1
- 1
test/data/ini_iniread/list_keys View File

@@ -1,5 +1,5 @@
1 1
 # desc: list keys
2
-# cmd: iniread -L keys
2
+# cmd: cfgrep -L keys
3 3
 
4 4
 [section1]
5 5
 free form in s1

+ 1
- 1
test/data/ini_iniread/list_paths View File

@@ -1,5 +1,5 @@
1 1
 # desc: list paths
2
-# cmd: iniread -L paths
2
+# cmd: cfgrep -L paths
3 3
 
4 4
 [section1]
5 5
 free form in s1

+ 1
- 1
test/data/ini_iniread/list_sections View File

@@ -1,5 +1,5 @@
1 1
 # desc: list sections
2
-# cmd: iniread -L sections
2
+# cmd: cfgrep -L sections
3 3
 
4 4
 [section1]
5 5
 free form in s1

test/data/ini_iniread/merge-a/t.ini → test/data/ini_iniread/merge-a/t.conf View File


test/data/ini_iniread/merge-b/t.ini → test/data/ini_iniread/merge-b/t.conf View File


+ 1
- 1
test/data/ini_iniread/merge_first View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread t.ini
2
+# cmd: cfgrep t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge-b

+ 1
- 1
test/data/ini_iniread/merge_first_no1 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread t.ini
2
+# cmd: cfgrep t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first_no1.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-x:merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-x:merge-a:merge-b

+ 1
- 1
test/data/ini_iniread/merge_first_no2 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread t.ini
2
+# cmd: cfgrep t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first_no2.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-x:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge-x:merge-b

+ 1
- 1
test/data/ini_iniread/merge_first_no3 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread t.ini
2
+# cmd: cfgrep t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first_no3.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b:merge-x
1
+FFOO_CONFIG_PATH=merge-a:merge-b:merge-x

+ 1
- 1
test/data/ini_iniread/merge_first_none View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread t.ini
2
+# cmd: cfgrep t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first_none.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-x:merge-y:merge-z
1
+FFOO_CONFIG_PATH=merge-x:merge-y:merge-z

+ 1
- 1
test/data/ini_iniread/merge_first_strict View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge in strict mode
2
-# cmd: iniread -S t.ini
2
+# cmd: cfgrep -S t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_first_strict.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge-b

+ 1
- 1
test/data/ini_iniread/merge_join View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread -j t.ini
2
+# cmd: cfgrep -j t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge-b

+ 1
- 1
test/data/ini_iniread/merge_join_no1 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread -j t.ini
2
+# cmd: cfgrep -j t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join_no1.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-x:merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-x:merge-a:merge-b

+ 1
- 1
test/data/ini_iniread/merge_join_no2 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread -j t.ini
2
+# cmd: cfgrep -j t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join_no2.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge:x:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge:x:merge-b

+ 1
- 1
test/data/ini_iniread/merge_join_no3 View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread -j t.ini
2
+# cmd: cfgrep -j t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join_no3.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b:merge:x
1
+FFOO_CONFIG_PATH=merge-a:merge-b:merge:x

+ 1
- 1
test/data/ini_iniread/merge_join_none View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge
2
-# cmd: iniread -j t.ini
2
+# cmd: cfgrep -j t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join_none.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-x:merge-y:merge-z
1
+FFOO_CONFIG_PATH=merge-x:merge-y:merge-z

+ 1
- 1
test/data/ini_iniread/merge_join_strict View File

@@ -1,5 +1,5 @@
1 1
 # desc: merge in strict mode
2
-# cmd: iniread -j -S t.ini
2
+# cmd: cfgrep -j -S t.conf
3 3
 
4 4
 #   #
5 5
 # S #

+ 1
- 1
test/data/ini_iniread/merge_join_strict.env View File

@@ -1 +1 @@
1
-FFOO_INI_PATH=merge-a:merge-b
1
+FFOO_CONFIG_PATH=merge-a:merge-b

+ 2
- 2
test/data/ini_iniread/merge_join_strict.oracle View File

@@ -1,4 +1,4 @@
1
-# file: merge-a/t.ini
1
+# file: merge-a/t.conf
2 2
 #   #
3 3
 # A #
4 4
 #   #
@@ -9,7 +9,7 @@
9 9
 [s2]
10 10
     k1=file-a-s2k1
11 11
     k2=file-a-s2k2
12
-# file: merge-b/t.ini
12
+# file: merge-b/t.conf
13 13
 #   #
14 14
 # B #
15 15
 #   #

+ 1
- 1
test/data/ini_iniread/path View File

@@ -1,5 +1,5 @@
1 1
 # desc: path
2
-# cmd: iniread -p section1.key1
2
+# cmd: cfgrep -p section1.key1
3 3
 
4 4
 [section1]
5 5
 free form in s1

+ 1
- 1
test/data/ini_iniread/plain View File

@@ -1,5 +1,5 @@
1 1
 # desc: plain
2
-# cmd: iniread --
2
+# cmd: cfgrep --
3 3
 
4 4
 hello
5 5
 hello1

+ 1
- 1
test/data/ini_iniread/plain_strict View File

@@ -1,5 +1,5 @@
1 1
 # desc: plain_strict
2
-# cmd: iniread -S
2
+# cmd: cfgrep -S
3 3
 
4 4
 # some strict-ish comments
5 5
 

+ 1
- 1
test/data/ini_iniread/sections_only View File

@@ -1,5 +1,5 @@
1 1
 # desc: sections only
2
-# cmd: iniread -s section2
2
+# cmd: cfgrep -s section2
3 3
 
4 4
 [section1]
5 5
 line11

+ 1
- 1
test/data/ini_iniread/strict_and_space View File

@@ -1,5 +1,5 @@
1 1
 # desc: tricks with strict and script
2
-# cmd: iniread -S -s myscript -k py
2
+# cmd: cfgrep -S -s myscript -k py
3 3
 
4 4
 [myscript]
5 5
 py =#!/usr/bin/python

+ 1
- 1
test/data/ini_iniread/strict_and_tab View File

@@ -1,5 +1,5 @@
1 1
 # desc: tricks with strict and script
2
-# cmd: iniread -S -s my_script -k py
2
+# cmd: cfgrep -S -s my_script -k py
3 3
 
4 4
 [my_script]
5 5
 py =#!/usr/bin/python

+ 1
- 1
test/data/ini_iniread/tricks_with_strange_naming View File

@@ -1,5 +1,5 @@
1 1
 # desc: tricks with strange naming
2
-# cmd: iniread -s "section with/ slash and spaces"
2
+# cmd: cfgrep -s "section with/ slash and spaces"
3 3
 
4 4
 [section with/ slash and spaces]
5 5
     [line starting with lbracket

+ 1
- 1
test/scripts/ini_iniread View File

@@ -3,7 +3,7 @@
3 3
 . $TF_PROJDIR/test/include/simple.sh
4 4
 
5 5
 . <(ffoom init) || tf_exit_quit    "failed to init ffoo"
6
-ffoo import ini || tf_exit_bailout "failed to import ini"
6
+ffoo import config || tf_exit_bailout "failed to import config"
7 7
 
8 8
 tf_enum_subtests() {
9 9
     echo "both_keys_and_sections"