New upstream version 1.9
[debian/gzip] / tests / init.cfg
index 901209ceae96dd53ef2d110784fdba39c98254b4..27515c5ad655d4819a70ae068a802e43b38f5b9a 100644 (file)
@@ -3,3 +3,13 @@
 # This goes hand in hand with the "exec 9>&2;" in Makefile.am's
 # TESTS_ENVIRONMENT definition.
 stderr_fileno_=9
+
+# Like printf with a single argument, but that argument must be a
+# sequence of four-byte strings \xHH where each H is a hexadecimal byte.
+hex_printf_()
+{
+  local octal_fmt=$(printf '\\%o' \
+    $(printf '%s\n' "$1" \
+      | sed 's,\\x\([0-9abcdefABCDEF][0-9abcdefABCDEF]\), 0x\1,g'))
+  printf "$octal_fmt"
+}