X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=test%2Ftests.d%2F050_show;fp=test%2Ftests.d%2F050_show;h=ce0eafc913437df809d56b1495093373d7925be8;hp=7d7e1602724ecf3d893f27deadb8ddf631bfcec6;hb=8dd9e03ef277f0078b1a75e6c7d82e9d42f35c2f;hpb=5086ffb40bd77dd14ce78534b38a86fe371aadb8 diff --git a/test/tests.d/050_show b/test/tests.d/050_show index 7d7e160..ce0eafc 100644 --- a/test/tests.d/050_show +++ b/test/tests.d/050_show @@ -9,3 +9,34 @@ test_get_parsing() assertFailWithNoReturn "${UCI_Q} show test.section.opt.val.qsdf.qsd" assertFailWithNoReturn "${UCI_Q} show test.section.opt.valqsqsd" } + +prepare_get_parsing_multiline() { + cp ${REF_DIR}/show_parsing_multiline.data ${CONFIG_DIR}/sockd +} + +test_get_parsing_multiline_package() +{ + prepare_get_parsing_multiline + + value=$(${UCI_Q} show sockd) + value_ref=$(cat ${REF_DIR}/show_parsing_multiline_package.result) + assertEquals "$value_ref" "$value" +} + +test_get_parsing_multiline_section() +{ + prepare_get_parsing_multiline + + value=$(${UCI_Q} show sockd.instance0) + value_ref=$(cat ${REF_DIR}/show_parsing_multiline_section.result) + assertEquals "$value_ref" "$value" +} + +test_get_parsing_multiline_option() +{ + prepare_get_parsing_multiline + + value=$(${UCI_Q} show sockd.instance0.extra_config) + value_ref=$(cat ${REF_DIR}/show_parsing_multiline_option.result) + assertEquals "$value_ref" "$value" +}