uci: fix a potential use-after-free in uci_set()
[project/uci.git] / test / tests.d / 010_export
1 test_export ()
2 {
3         cp ${REF_DIR}/export.data ${CONFIG_DIR}/export
4
5         ${UCI_Q} export nilpackage
6         assertFalse $?
7
8         ${UCI_Q} export export 1>/dev/null 2>&1
9         assertTrue $?
10
11         ${UCI} export > ${TMP_DIR}/export.result
12         assertTrue $?
13         assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
14 }