+# Test wimverify and the SHA-1 code
+WIMLIB_DISABLE_CPU_FEATURES='*' wimcapture dir dir.wim --compress=none
+disabled=''
+for cpu_feature in '' sha1 bmi2 avx sse4.2 sse4.1 ssse3; do
+ [ -n "$disabled" ] && disabled+=','
+ disabled+="$cpu_feature"
+ if ! WIMLIB_DISABLE_CPU_FEATURES=$disabled wimverify dir.wim; then
+ error "wimverify failed (cpu_features_disabled=$disabled)"
+ fi
+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
+