Problem reported by Eric Benoit in: http://bugs.gnu.org/16401
* gzip.c (treat_file): When keeping a file, don't say it's replaced.
* NEWS: Document this.
* tests/keep: Test this.
on some platforms when compiled with optimization.
[bug introduced in gzip-1.3.6]
+ gzip -k -v no longer reports that files are replaced.
+ [bug present since the beginning]
+
zgrep no longer malfunctions with a multi-digit context option like -15.
Now, it passes that option to grep (equivalent to -C15) just as it does
for single-digit options. [bug introduced in gzip-1.3.12]
} else {
display_ratio(bytes_in-(bytes_out-header_bytes), bytes_in, stderr);
}
- if (!test && !to_stdout) {
- fprintf(stderr, " -- replaced with %s", ofname);
- }
+ if (!test && !to_stdout)
+ fprintf(stderr, " -- %s %s", keep ? "created" : "replaced with",
+ ofname);
fprintf(stderr, "\n");
}
}
rm -f in.gz || fail=1
done
+cp orig in || framework_failure_
+log=$(gzip -kv in 2>&1) || fail=1
+case $log in
+ *'created in.gz'*) ;;
+ *) fail=1;;
+esac
+
Exit $fail