commit: e7f38751a31cc8c929e67a082776b3787e0d71ae
parent b6d3da7af6c0418c4180d9cf2c44b14754ba1892
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 17 Mar 2025 18:48:04 +0100
test-cmd/getconf.sh: new
Diffstat:
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/test-cmd/getconf.sh b/test-cmd/getconf.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
+# SPDX-License-Identifier: MPL-2.0
+
+WD="$(dirname "$0")"
+target="${WD}/../cmd/getconf"
+plans=3
+. "${WD}/tap.sh"
+
+getconf_dupes() { "$target" -a | cut -d= -f1 | sort | uniq -d; }
+
+# utils-std doesn't have sort yet
+if command -v sort >/dev/null 2>/dev/null; then
+ t_cmd nodupes '' getconf_dupes
+else
+ skip nodupes 'command not found: sort'
+fi
+
+t_args --exit=1 wrong_sys_var:NAME_MAX 'getconf: error: unknown system_var "NAME_MAX"
+' NAME_MAX
+
+t_args --exit=1 wrong_path_var:LOGIN_NAME_MAX 'getconf: error: unknown path_var "LOGIN_NAME_MAX"
+' LOGIN_NAME_MAX .