12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- test_set_parsing()
- {
- cp ${REF_DIR}/set_parsing.data ${CONFIG_DIR}/test
- assertFailWithNoReturn "${UCI_Q} set test.=val"
- assertFailWithNoReturn "${UCI_Q} set test.section.=val"
- assertFailWithNoReturn "${UCI_Q} set test.section.opt.=val"
- assertFailWithNoReturn "${UCI_Q} set test.section.opt.zflk=val"
- }
- test_set_named_section()
- {
- touch ${CONFIG_DIR}/set
- ${UCI} set set.section=named
- assertSameFile ${REF_DIR}/set_named_section.result ${CHANGES_DIR}/set
- }
- test_set_nonexisting_option()
- {
- cp ${REF_DIR}/set_nonexisting_option.data ${CONFIG_DIR}/set
- ${UCI} set set.section.opt=val
- assertSameFile ${REF_DIR}/set_nonexisting_option.result ${CHANGES_DIR}/set
- }
- test_set_nonexisting_option_multiline()
- {
- cp ${REF_DIR}/set_nonexisting_option.data ${CONFIG_DIR}/set
- ${UCI} set set.section.opt="Hello,\'
- World\""
- assertSameFile ${REF_DIR}/set_nonexisting_option_multiline.result ${CHANGES_DIR}/set
- }
- test_set_existing_option()
- {
- cp ${REF_DIR}/set_existing_option.data ${CONFIG_DIR}/set
- ${UCI} set set.section.opt=val
- assertSameFile ${REF_DIR}/set_existing_option.result ${CHANGES_DIR}/set
- }
- test_set_existing_option_multiline()
- {
- cp ${REF_DIR}/set_existing_option.data ${CONFIG_DIR}/set
- ${UCI} set set.section.opt="Hello,\'
- World\""
- assertSameFile ${REF_DIR}/set_existing_option_multiline.result ${CHANGES_DIR}/set
- }
|