You've already forked bash-ini-parser
mirror of
https://github.com/albfan/bash-ini-parser.git
synced 2025-08-09 05:22:44 +03:00
Update variable test.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
|
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
|
||||||
$(top_srcdir)/build-aux/tap-driver.sh
|
$(top_srcdir)/build-aux/tap-driver.sh
|
||||||
TESTS = t0001-whitespace.sh t0002-invalid.sh t0003-sections.sh t0004-comments.sh t0005-new_var.sh
|
TESTS = t0001-whitespace.sh t0002-invalid.sh t0003-sections.sh t0004-comments.sh t0005-new_var.sh t0006-duplication.sh
|
||||||
EXTRA_DIST = $(TESTS)
|
EXTRA_DIST = $(TESTS)
|
||||||
|
23
t/t0006-duplication.sh
Executable file
23
t/t0006-duplication.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
test_description="check duplication"
|
||||||
|
|
||||||
|
. setup.sh
|
||||||
|
|
||||||
|
DIR_TEST=$SHARNESS_TEST_DIRECTORY/t0006
|
||||||
|
|
||||||
|
test_expect_failure "Remove duplication" "
|
||||||
|
export COVERAGE_NAME=duplication_parser
|
||||||
|
cp ../.simplecov .
|
||||||
|
cfg_parser $DIR_TEST/duplication.ini
|
||||||
|
export COVERAGE_NAME=duplication_section
|
||||||
|
cfg_section_sec1
|
||||||
|
var1=bar
|
||||||
|
export COVERAGE_NAME=duplication_update
|
||||||
|
cfg_update sec1 var1
|
||||||
|
export COVERAGE_NAME=duplication_writer
|
||||||
|
cfg_writer > duplication.out
|
||||||
|
diff $DIR_TEST/duplication.out.correct duplication.out
|
||||||
|
"
|
||||||
|
|
||||||
|
test_done
|
6
t/t0006/duplication.ini
Normal file
6
t/t0006/duplication.ini
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[sec1]
|
||||||
|
var1=foo
|
||||||
|
var2=foo2
|
||||||
|
[sec2]
|
||||||
|
var1=foo
|
||||||
|
var2=foo2
|
6
t/t0006/duplication.out.correct
Normal file
6
t/t0006/duplication.out.correct
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[sec1]
|
||||||
|
var1="bar"
|
||||||
|
var2="foo2"
|
||||||
|
[sec2]
|
||||||
|
var1="foo"
|
||||||
|
var2="foo2"
|
Reference in New Issue
Block a user