Adds a unit test framework based on shunit2
[project/uci.git] / test / tests.d / 030_set
1 test_set_named_section()
2 {
3         touch ${CONFIG_DIR}/set
4         ${UCI} set set.section=named
5         assertSameFile ${REF_DIR}/set_named_section.result ${CHANGES_DIR}/set
6 }
7
8 test_set_nonexisting_option()
9 {
10         cp ${REF_DIR}/set_nonexisting_option.data ${CONFIG_DIR}/set
11         ${UCI} set set.section.opt=val
12         assertSameFile ${REF_DIR}/set_nonexisting_option.result ${CHANGES_DIR}/set
13 }
14
15 test_set_existing_option()
16 {
17         cp ${REF_DIR}/set_existing_option.data ${CONFIG_DIR}/set
18         ${UCI} set set.section.opt=val
19         assertSameFile ${REF_DIR}/set_existing_option.result ${CHANGES_DIR}/set
20 }