diff --git a/t/t0005-new_var.sh b/t/t0005-new_var.sh new file mode 100755 index 0000000..6ca0838 --- /dev/null +++ b/t/t0005-new_var.sh @@ -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 diff --git a/t/t0005/var.ini b/t/t0005/var.ini new file mode 100644 index 0000000..f30281c --- /dev/null +++ b/t/t0005/var.ini @@ -0,0 +1,2 @@ +[sec1] +var1=foo diff --git a/t/t0005/var.out.correct b/t/t0005/var.out.correct new file mode 100644 index 0000000..fbf049c --- /dev/null +++ b/t/t0005/var.out.correct @@ -0,0 +1,3 @@ +[sec1] +var1="foo" +var2="bar"