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

test invalid ini files

it is break by now

relates to #4
This commit is contained in:
albfan
2015-05-16 21:35:31 +02:00
parent 389ef3f00f
commit 1be6551065
3 changed files with 27 additions and 1 deletions

17
t/t0002-invalid.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
SHARNESS_TEST_EXTENSION="sh"
test_description="check invalid ini files"
. sharness/sharness.sh
. ../../bash-ini-parser
DIR_TEST=$SHARNESS_TEST_DIRECTORY/t0002
test_expect_success "Invalid line" "
test_expect_code 1 cfg_parser $DIR_TEST/invalid.ini
"
test_done

8
t/t0002/invalid.ini Normal file
View File

@@ -0,0 +1,8 @@
var1=VAR1
; Invalid line - should throw an error and stop processing
INVALID LINE
var2=VAR2