1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-04-21 00:07:46 +03:00

add broken test for comments

This commit is contained in:
albfan 2018-01-22 22:43:58 +01:00
parent 2ddf0abc5c
commit 0184648014
3 changed files with 40 additions and 0 deletions

19
t/t0004-comments.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
SHARNESS_TEST_EXTENSION="sh"
test_description="check comments"
. sharness/sharness.sh
. ../../bash-ini-parser
DIR_TEST=$SHARNESS_TEST_DIRECTORY/t0004
test_expect_success "Parse sections" "
cfg_parser $DIR_TEST/comments.ini
cfg_writer > comments.out
diff $DIR_TEST/comments.out.correct comments.out
"
test_done

12
t/t0004/comments.ini Normal file
View File

@ -0,0 +1,12 @@
;initial comment
[sec1]
var1=foo
var2=hoge
var3=hoge#bar
var4="#hello #bye #chao"
[sec2]
;another comment
#a comment
var2=foo
var4="123#456"
var5=234#456

View File

@ -0,0 +1,9 @@
[sec1]
var1="foo"
var2="hoge"
var3="hoge#bar"
var4="#hello #bye #chao"
[sec2]
var2="foo"
var4="123#456"
var5="234#456"