]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
wimappend: add --create option to create WIM file if needed
[wimlib] / tests / test-imagex
index d36bf82f343fd15d5261b7db913d2c5f02c8bfb9..9c92715b1fca95a100939f7066088a632e535bf4 100755 (executable)
@@ -65,6 +65,21 @@ for comp_type in None LZX XPRESS; do
        rm -rf dir.wim tmp
 done
 
+# Test wimappend --create
+rm -f dir.wim
+if wimappend dir dir.wim; then
+       error "wimappend to nonexisting file unexpectedly succeeded"
+fi
+if ! wimappend dir dir.wim --create; then
+       error "wimappend --create to nonexisting file failed"
+fi
+if ! wimappend dir dir.wim --create; then
+       error "wimappend --create to existing file failed"
+fi
+if ! test "`wiminfo dir.wim | grep 'Image Count' | awk '{print $3}'`" = 2; then
+       error "Incorrect WIM image count after wimappend --create"
+fi
+
 # Capturing and modifying name, description, and bootable flag
 
 echo "Testing capture of WIM with default name and description"