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:
parent
2ddf0abc5c
commit
0184648014
19
t/t0004-comments.sh
Executable file
19
t/t0004-comments.sh
Executable 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
12
t/t0004/comments.ini
Normal 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
|
9
t/t0004/comments.out.correct
Normal file
9
t/t0004/comments.out.correct
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user