]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-update_and_extract
Improve encoding detection of wimupdate command files
[wimlib] / tests / test-imagex-update_and_extract
index 6c8771669c8c57c3b8fde78f74c1c19aec5240b0..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