commit: 0a5dbb24a2fcaa757f6e68c875aa77aef4e29bdf
parent c45ddc01a447dbb3ad519a08e38287e96504d55e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 20 Sep 2024 04:05:05 +0200
cmd/sha*sum: unify error message formatting
Diffstat:
6 files changed, 79 insertions(+), 65 deletions(-)
diff --git a/cmd/sha1sum.c b/cmd/sha1sum.c
@@ -34,7 +34,7 @@ sha1sum(int fd, const char *fdname, char sum[SHA1SUM_LEN])
if(nread < 0)
{
fprintf(stderr,
- "sha1sum: I/O Error while reading file '%s': %s\n",
+ "sha1sum: error: Failed reading file '%s': %s\n",
fdname ? fdname : "<stdin>",
strerror(errno));
return -1;
@@ -77,7 +77,7 @@ check(FILE *file, const char *filename)
}
fprintf(stderr,
- "sha1sum: Error: Invalid character '%c' while reading hash in line: %s\n",
+ "sha1sum: error: Invalid character '%c' while reading hash in line: %s\n",
line[i],
line);
if(len > 0) free(line);
@@ -85,7 +85,7 @@ check(FILE *file, const char *filename)
}
if(line[i++] != '\0')
{
- fprintf(stderr, "sha1sum: Error: Invalid line: %s\n", line);
+ fprintf(stderr, "sha1sum: error: Invalid line: %s\n", line);
if(len > 0) free(line);
return -1;
}
@@ -93,7 +93,7 @@ check(FILE *file, const char *filename)
if(i != SHA1SUM_LEN)
{
fprintf(stderr,
- "sha1sum: Error: Got %zd hexadecimal digits while expected %d for a SHA1\n",
+ "sha1sum: error: Got %zd hexadecimal digits while expected %d for a SHA1\n",
i,
SHA1SUM_LEN);
if(len > 0) free(line);
@@ -110,7 +110,7 @@ check(FILE *file, const char *filename)
int fd = open(target, O_RDONLY | O_NOCTTY);
if(fd < 0)
{
- fprintf(stderr, "sha1sum: Error: Failed opening file '%s': %s\n", target, strerror(errno));
+ fprintf(stderr, "sha1sum: error: Failed opening file '%s': %s\n", target, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -119,7 +119,7 @@ check(FILE *file, const char *filename)
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha1sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha1sum: warning: posix_fadvise failed on file '%s': %s\n",
target,
strerror(ret));
@@ -137,7 +137,7 @@ check(FILE *file, const char *filename)
if(close(fd) < 0)
{
- fprintf(stderr, "sha1sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(stderr, "sha1sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -146,7 +146,10 @@ check(FILE *file, const char *filename)
if(nread < 0 && errno != 0)
{
err = 1;
- fprintf(stderr, "sha1sum: Failed reading line from file '%s': %s\n", filename, strerror(errno));
+ fprintf(stderr,
+ "sha1sum: error: Failed reading line from file '%s': %s\n",
+ filename,
+ strerror(errno));
}
if(len > 0) free(line);
@@ -167,7 +170,7 @@ main(int argc, char *argv[])
opt_c = true;
break;
default:
- fprintf(stderr, "sha1sum: Unhandled option '-%c'\n", c);
+ fprintf(stderr, "sha1sum: error: Unhandled option '-%c'\n", c);
return 1;
}
}
@@ -202,7 +205,7 @@ main(int argc, char *argv[])
if(file == NULL)
{
fprintf(
- stderr, "sha1sum: Error: Failed opening file '%s': %s\n", filename, strerror(errno));
+ stderr, "sha1sum: error: Failed opening file '%s': %s\n", filename, strerror(errno));
return 1;
}
}
@@ -211,7 +214,8 @@ main(int argc, char *argv[])
if(fclose(file) < 0)
{
- fprintf(stderr, "sha1sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha1sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
}
@@ -245,14 +249,14 @@ main(int argc, char *argv[])
if(fd < 0)
{
fprintf(
- stderr, "sha1sum: Error: Failed opening file '%s': %s\n", filename, strerror(errno));
+ stderr, "sha1sum: error: Failed opening file '%s': %s\n", filename, strerror(errno));
return 1;
}
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha1sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha1sum: warning: posix_fadvise failed on file '%s': %s\n",
filename,
strerror(ret));
}
@@ -265,7 +269,7 @@ main(int argc, char *argv[])
if(close(fd) < 0)
{
- fprintf(stderr, "sha1sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(stderr, "sha1sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
diff --git a/cmd/sha256sum.c b/cmd/sha256sum.c
@@ -34,7 +34,7 @@ sha256sum(int fd, const char *fdname, char sum[SHA256SUM_LEN])
if(nread < 0)
{
fprintf(stderr,
- "sha256sum: I/O Error while reading file '%s': %s\n",
+ "sha256sum: error: Failed reading file '%s': %s\n",
fdname ? fdname : "<stdin>",
strerror(errno));
return -1;
@@ -77,7 +77,7 @@ check(FILE *file, const char *filename)
}
fprintf(stderr,
- "sha256sum: Error: Invalid character '%c' while reading hash in line: %s\n",
+ "sha256sum: error: Invalid character '%c' while reading hash in line: %s\n",
line[i],
line);
if(len > 0) free(line);
@@ -85,7 +85,7 @@ check(FILE *file, const char *filename)
}
if(line[i++] != '\0')
{
- fprintf(stderr, "sha256sum: Error: Invalid line: %s\n", line);
+ fprintf(stderr, "sha256sum: error: Invalid line: %s\n", line);
if(len > 0) free(line);
return -1;
}
@@ -93,7 +93,7 @@ check(FILE *file, const char *filename)
if(i != SHA256SUM_LEN)
{
fprintf(stderr,
- "sha256sum: Error: Got %zd hexadecimal digits while expected %d for a SHA256\n",
+ "sha256sum: error: Got %zd hexadecimal digits while expected %d for a SHA256\n",
i,
SHA256SUM_LEN);
if(len > 0) free(line);
@@ -110,7 +110,7 @@ check(FILE *file, const char *filename)
int fd = open(target, O_RDONLY | O_NOCTTY);
if(fd < 0)
{
- fprintf(stderr, "sha256sum: Error: Failed opening file '%s': %s\n", target, strerror(errno));
+ fprintf(stderr, "sha256sum: error: Failed opening file '%s': %s\n", target, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -119,7 +119,7 @@ check(FILE *file, const char *filename)
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha256sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha256sum: warning: posix_fadvise failed on file '%s': %s\n",
target,
strerror(ret));
@@ -137,7 +137,8 @@ check(FILE *file, const char *filename)
if(close(fd) < 0)
{
- fprintf(stderr, "sha256sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha256sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -146,8 +147,10 @@ check(FILE *file, const char *filename)
if(nread < 0 && errno != 0)
{
err = 1;
- fprintf(
- stderr, "sha256sum: Failed reading line from file '%s': %s\n", filename, strerror(errno));
+ fprintf(stderr,
+ "sha256sum: error: Failed reading line from file '%s': %s\n",
+ filename,
+ strerror(errno));
}
if(len > 0) free(line);
@@ -168,7 +171,7 @@ main(int argc, char *argv[])
opt_c = true;
break;
default:
- fprintf(stderr, "sha256sum: Unhandled option '-%c'\n", c);
+ fprintf(stderr, "sha256sum: error: Unhandled option '-%c'\n", c);
return 1;
}
}
@@ -203,7 +206,7 @@ main(int argc, char *argv[])
if(file == NULL)
{
fprintf(stderr,
- "sha256sum: Error: Failed opening file '%s': %s\n",
+ "sha256sum: error: Failed opening file '%s': %s\n",
filename,
strerror(errno));
return 1;
@@ -214,7 +217,8 @@ main(int argc, char *argv[])
if(fclose(file) < 0)
{
- fprintf(stderr, "sha256sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha256sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
}
@@ -248,14 +252,14 @@ main(int argc, char *argv[])
if(fd < 0)
{
fprintf(
- stderr, "sha256sum: Error: Failed opening file '%s': %s\n", filename, strerror(errno));
+ stderr, "sha256sum: error: Failed opening file '%s': %s\n", filename, strerror(errno));
return 1;
}
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha256sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha256sum: warning: posix_fadvise failed on file '%s': %s\n",
filename,
strerror(ret));
}
@@ -268,7 +272,8 @@ main(int argc, char *argv[])
if(close(fd) < 0)
{
- fprintf(stderr, "sha256sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha256sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
diff --git a/cmd/sha512sum.c b/cmd/sha512sum.c
@@ -34,7 +34,7 @@ sha512sum(int fd, const char *fdname, char sum[SHA512SUM_LEN])
if(nread < 0)
{
fprintf(stderr,
- "sha512sum: I/O Error while reading file '%s': %s\n",
+ "sha512sum: error: Failed reading file '%s': %s\n",
fdname ? fdname : "<stdin>",
strerror(errno));
return -1;
@@ -77,7 +77,7 @@ check(FILE *file, const char *filename)
}
fprintf(stderr,
- "sha512sum: Error: Invalid character '%c' while reading hash in line: %s\n",
+ "sha512sum: error: Invalid character '%c' while reading hash in line: %s\n",
line[i],
line);
if(len > 0) free(line);
@@ -85,7 +85,7 @@ check(FILE *file, const char *filename)
}
if(line[i++] != '\0')
{
- fprintf(stderr, "sha512sum: Error: Invalid line: %s\n", line);
+ fprintf(stderr, "sha512sum: error: Invalid line: %s\n", line);
if(len > 0) free(line);
return -1;
}
@@ -93,7 +93,7 @@ check(FILE *file, const char *filename)
if(i != SHA512SUM_LEN)
{
fprintf(stderr,
- "sha512sum: Error: Got %zd hexadecimal digits while expected %d for a SHA512\n",
+ "sha512sum: error: Got %zd hexadecimal digits while expected %d for a SHA512\n",
i,
SHA512SUM_LEN);
if(len > 0) free(line);
@@ -110,7 +110,7 @@ check(FILE *file, const char *filename)
int fd = open(target, O_RDONLY | O_NOCTTY);
if(fd < 0)
{
- fprintf(stderr, "sha512sum: Error: Failed opening file '%s': %s\n", target, strerror(errno));
+ fprintf(stderr, "sha512sum: error: Failed opening file '%s': %s\n", target, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -119,7 +119,7 @@ check(FILE *file, const char *filename)
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha512sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha512sum: warning: posix_fadvise failed on file '%s': %s\n",
target,
strerror(ret));
@@ -137,7 +137,8 @@ check(FILE *file, const char *filename)
if(close(fd) < 0)
{
- fprintf(stderr, "sha512sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha512sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
if(len > 0) free(line);
return -1;
@@ -146,8 +147,10 @@ check(FILE *file, const char *filename)
if(nread < 0 && errno != 0)
{
err = 1;
- fprintf(
- stderr, "sha512sum: Failed reading line from file '%s': %s\n", filename, strerror(errno));
+ fprintf(stderr,
+ "sha512sum: error: Failed reading line from file '%s': %s\n",
+ filename,
+ strerror(errno));
}
if(len > 0) free(line);
@@ -168,7 +171,7 @@ main(int argc, char *argv[])
opt_c = true;
break;
default:
- fprintf(stderr, "sha512sum: Unhandled option '-%c'\n", c);
+ fprintf(stderr, "sha512sum: error: Unhandled option '-%c'\n", c);
return 1;
}
}
@@ -203,7 +206,7 @@ main(int argc, char *argv[])
if(file == NULL)
{
fprintf(stderr,
- "sha512sum: Error: Failed opening file '%s': %s\n",
+ "sha512sum: error: Failed opening file '%s': %s\n",
filename,
strerror(errno));
return 1;
@@ -214,7 +217,8 @@ main(int argc, char *argv[])
if(fclose(file) < 0)
{
- fprintf(stderr, "sha512sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha512sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
}
@@ -248,14 +252,14 @@ main(int argc, char *argv[])
if(fd < 0)
{
fprintf(
- stderr, "sha512sum: Error: Failed opening file '%s': %s\n", filename, strerror(errno));
+ stderr, "sha512sum: error: Failed opening file '%s': %s\n", filename, strerror(errno));
return 1;
}
int ret = posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
if(ret != 0)
fprintf(stderr,
- "sha512sum: Warning: posix_fadvise failed on file '%s': %s\n",
+ "sha512sum: warning: posix_fadvise failed on file '%s': %s\n",
filename,
strerror(ret));
}
@@ -268,7 +272,8 @@ main(int argc, char *argv[])
if(close(fd) < 0)
{
- fprintf(stderr, "sha512sum: Failed closing file '%s': %s\n", filename, strerror(errno));
+ fprintf(
+ stderr, "sha512sum: error: Failed closing file '%s': %s\n", filename, strerror(errno));
return 1;
}
diff --git a/test-cmd/sha1sum.sh b/test-cmd/sha1sum.sh
@@ -22,7 +22,7 @@ t --input='' 'empty_stdin' '' 'da39a3ee5e6b4b0d3255bfef95601890afd80709
t --input='abc' 'abc' '' 'a9993e364706816aba3e25717850c26c9cd0d89d
'
-t --exit=1 'enoent' '/var/empty/e/no/ent' "sha1sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 'enoent' '/var/empty/e/no/ent' "sha1sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
t --input="da39a3ee5e6b4b0d3255bfef95601890afd80709 $WD/inputs/empty" 'check:empty' '-c' "$WD/inputs/empty: OK
@@ -37,16 +37,16 @@ t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89d $WD/inputs/empty"
t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89d *$WD/inputs/empty" 'xfail_bin_check:empty' '-c' "$WD/inputs/empty: FAILED
"
-t --exit=1 --input='a9993e364706816aba3e25717850c26c9cd0d89d /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha1sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='a9993e364706816aba3e25717850c26c9cd0d89d /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha1sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input='a9993e364706816aba3e25717850c26c9cd0d89d */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha1sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='a9993e364706816aba3e25717850c26c9cd0d89d */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha1sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha1sum: Error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
+t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha1sum: error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
"
-t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89d" 'missing_file' '-c' "sha1sum: Error: Failed opening file '': No such file or directory
+t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89d" 'missing_file' '-c' "sha1sum: error: Failed opening file '': No such file or directory
"
-t --exit=1 --input="a9993e364706816aba3e25717 $WD/inputs/empty" 'truncated_hash' '-c' 'sha1sum: Error: Got 26 hexadecimal digits while expected 41 for a SHA1
+t --exit=1 --input="a9993e364706816aba3e25717 $WD/inputs/empty" 'truncated_hash' '-c' 'sha1sum: error: Got 26 hexadecimal digits while expected 41 for a SHA1
'
-t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89da9993e364706816aba3e25717850c26c9cd0d89d $WD/inputs/empty" 'elongated_hash' '-c' 'sha1sum: Error: Got 81 hexadecimal digits while expected 41 for a SHA1
+t --exit=1 --input="a9993e364706816aba3e25717850c26c9cd0d89da9993e364706816aba3e25717850c26c9cd0d89d $WD/inputs/empty" 'elongated_hash' '-c' 'sha1sum: error: Got 81 hexadecimal digits while expected 41 for a SHA1
'
diff --git a/test-cmd/sha256sum.sh b/test-cmd/sha256sum.sh
@@ -22,7 +22,7 @@ t --input='' 'empty_stdin' '' 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca
t --input='abc' 'abc' '' 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
'
-t --exit=1 'enoent' '/var/empty/e/no/ent' "sha256sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 'enoent' '/var/empty/e/no/ent' "sha256sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
t --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 $WD/inputs/empty" 'check:empty' '-c' "$WD/inputs/empty: OK
@@ -37,16 +37,16 @@ t --exit=1 --input="ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f200
t --exit=1 --input="ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad *$WD/inputs/empty" 'xfail_bin_check:empty' '-c' "$WD/inputs/empty: FAILED
"
-t --exit=1 --input='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha256sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha256sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha256sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha256sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha256sum: Error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
+t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha256sum: error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
"
-t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 'missing_file' '-c' "sha256sum: Error: Failed opening file '': No such file or directory
+t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 'missing_file' '-c' "sha256sum: error: Failed opening file '': No such file or directory
"
-t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85 $WD/inputs/empty" 'truncated_hash' '-c' 'sha256sum: Error: Got 64 hexadecimal digits while expected 65 for a SHA256
+t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85 $WD/inputs/empty" 'truncated_hash' '-c' 'sha256sum: error: Got 64 hexadecimal digits while expected 65 for a SHA256
'
-t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855d $WD/inputs/empty" 'elongated_hash' '-c' 'sha256sum: Error: Got 66 hexadecimal digits while expected 65 for a SHA256
+t --exit=1 --input="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855d $WD/inputs/empty" 'elongated_hash' '-c' 'sha256sum: error: Got 66 hexadecimal digits while expected 65 for a SHA256
'
diff --git a/test-cmd/sha512sum.sh b/test-cmd/sha512sum.sh
@@ -22,7 +22,7 @@ t --input='' 'empty_stdin' '' 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc8
t --input='abc' 'abc' '' 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
'
-t --exit=1 'enoent' '/var/empty/e/no/ent' "sha512sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 'enoent' '/var/empty/e/no/ent' "sha512sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
t --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e $WD/inputs/empty" 'check:empty' '-c' "$WD/inputs/empty: OK
@@ -37,16 +37,16 @@ t --exit=1 --input="ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55
t --exit=1 --input="ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f *$WD/inputs/empty" 'xfail_bin_check:empty' '-c' "$WD/inputs/empty: FAILED
"
-t --exit=1 --input='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha512sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e /var/empty/e/no/ent' 'xfail_check:enoent' '-c' "sha512sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha512sum: Error: Failed opening file '/var/empty/e/no/ent': No such file or directory
+t --exit=1 --input='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e */var/empty/e/no/ent' 'xfail_bin_check:enoent' '-c' "sha512sum: error: Failed opening file '/var/empty/e/no/ent': No such file or directory
"
-t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha512sum: Error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
+t --exit=1 --input="# $WD/inputs/empty" 'invalid_chars:#' '-c' "sha512sum: error: Invalid character '#' while reading hash in line: # $WD/inputs/empty
"
-t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" 'missing_file' '-c' "sha512sum: Error: Failed opening file '': No such file or directory
+t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" 'missing_file' '-c' "sha512sum: error: Failed opening file '': No such file or directory
"
-t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3 $WD/inputs/empty" 'truncated_hash' '-c' 'sha512sum: Error: Got 128 hexadecimal digits while expected 129 for a SHA512
+t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3 $WD/inputs/empty" 'truncated_hash' '-c' 'sha512sum: error: Got 128 hexadecimal digits while expected 129 for a SHA512
'
-t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3ed $WD/inputs/empty" 'elongated_hash' '-c' 'sha512sum: Error: Got 130 hexadecimal digits while expected 129 for a SHA512
+t --exit=1 --input="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3ed $WD/inputs/empty" 'elongated_hash' '-c' 'sha512sum: error: Got 130 hexadecimal digits while expected 129 for a SHA512
'