From f876ac085a86cc932c7d3093a7d007c78bff4751 Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 26 Apr 2016 13:28:04 -0700
Subject: [PATCH] Replace use of 'tempfile' with 'mktemp' in tests

The 'tempfile' command has been deprecated in Debian for many years
at this point and may not even be available on modern systems. Use
'mktemp' as the recommended replacement.
---
 lib/fmt/hidrd_read_test  | 6 +++---
 lib/fmt/hidrd_write_test | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/fmt/hidrd_read_test b/lib/fmt/hidrd_read_test
index 8ae1350..6b30f6b 100755
--- a/lib/fmt/hidrd_read_test
+++ b/lib/fmt/hidrd_read_test
@@ -39,9 +39,9 @@ function run ()
     local input="$1"; shift
     local output="$1"; shift
     local output_basename="`basename \"$output\"`"
-    local test_output="`tempfile -s\"_$output_basename.test\"`"
-    local txt_output="`tempfile -s\"_$output_basename.txt\"`"
-    local test_txt_output="`tempfile -s\"_$output_basename.txt.test\"`"
+    local test_output="`mktemp --suffix=\"_$output_basename.test\"`"
+    local txt_output="`mktemp --suffix=\"_$output_basename.txt\"`"
+    local test_txt_output="`mktemp --suffix=\"_$output_basename.txt.test\"`"
     local status
 
     echo "Checking \"$format\" reading from \"$input\"" \
diff --git a/lib/fmt/hidrd_write_test b/lib/fmt/hidrd_write_test
index 3cfb0aa..73dddd8 100755
--- a/lib/fmt/hidrd_write_test
+++ b/lib/fmt/hidrd_write_test
@@ -34,7 +34,7 @@ function run ()
     local input="$1"; shift
     local output="$1"; shift
     local output_basename="`basename \"$output\"`"
-    local test_output="`tempfile -s\"_$output_basename.test\"`"
+    local test_output="`mktemp --suffix=\"_$output_basename.test\"`"
     local status
 
     echo "Checking \"$format\" writing of \"$input\"" \
-- 
2.37.2

