1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-08-09 05:22:44 +03:00

Test case - create new var.

.../bash-ini-parser/t$ bash t0005-new_var.sh
not ok 1 - Parse new var
1..1
This commit is contained in:
Pavel Rehak
2018-05-24 17:59:52 +02:00
parent 695e55f986
commit 66c0ef705e
3 changed files with 25 additions and 0 deletions

20
t/t0005-new_var.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
test_description="create new var"
. setup.sh
DIR_TEST=$SHARNESS_TEST_DIRECTORY/t0005
test_expect_success "Parse new var" "
export COVERAGE_NAME=new_var_parser
cp ../.simplecov .
cfg_parser $DIR_TEST/var.ini
cfg_section_sec1
var2=bar
cfg_update sec1 var2
cfg_writer > var.out
diff $DIR_TEST/var.out.correct var.out
"
test_done

2
t/t0005/var.ini Normal file
View File

@@ -0,0 +1,2 @@
[sec1]
var1=foo

3
t/t0005/var.out.correct Normal file
View File

@@ -0,0 +1,3 @@
[sec1]
var1="foo"
var2="bar"