]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-update_and_extract
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / tests / test-imagex-update_and_extract
index 202371b1027de6d14121b293997b16f2d4e1dddf..721954df10584d1fd057af21505516431e8d8186 100755 (executable)
@@ -119,6 +119,26 @@ do_apply
 ../tree-cmp file out.dir/newname
 [ ! -e out.dir/file ]
 
+prepare_empty_wim
+msg "Testing UTF-16LE-NOBOM command update file"
+echo -ne 'a\0d\0d\0 \0f\0i\0l\0e\0 \0/\0f\0i\0l\0e\0\n\0' \
+       | wimupdate test.wim
+do_apply
+../tree-cmp file out.dir/file
+
+prepare_empty_wim
+msg "Testing UTF-16LE-BOM command update file"
+echo -ne '\xff\xfea\0d\0d\0 \0f\0i\0l\0e\0 \0/\0f\0i\0l\0e\0\n\0' \
+       | wimupdate test.wim
+do_apply
+../tree-cmp file out.dir/file
+
+prepare_empty_wim
+msg "Testing UTF-8-BOM command update file"
+echo -ne '\xef\xbb\xbfadd file /file' | wimupdate test.wim
+do_apply
+../tree-cmp file out.dir/file
+
 prepare_empty_wim
 msg "Testing adding, then renaming file in WIM image in one command"
 wimupdate test.wim << EOF
@@ -225,6 +245,16 @@ wimextract test.wim 1 @pathlist --dest-dir=out.dir
 ../tree-cmp hello2 out.dir/hello2
 [ ! -e out.dir/otherfile ]
 
+msg "Testing path list extract (stdin)"
+rm -rf out.dir
+wimextract test.wim 1 @- --dest-dir=out.dir << EOF
+hello1
+hello2
+EOF
+../tree-cmp hello1 out.dir/hello1
+../tree-cmp hello2 out.dir/hello2
+[ ! -e out.dir/otherfile ]
+
 msg "Testing path list extract (w/ wildcard)"
 cat > pathlist << EOF
 hello*