From 42c4578b49afaf3dc8de884262f34e4a19066860 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Sun, 7 Sep 2025 13:09:06 +0100
Subject: [PATCH] tests: ensure option aliases are supported
This implicitly tests the previous commit to
adjust how date(1) handles multiple named format options.
Currrently it tests the following are supported:
chown --quiet --silent
date --rfc-email --rfc-822 --rfc-2822
date --uct --utc --universal
dircolors --bourne-shell --sh
dircolors --csh --c-shell
head --quiet --silent
* tests/misc/option-aliases.sh: A new test to ensure all
option aliases supported by a command are supported.
* Reference the new test.
---
tests/local.mk | 1 +
tests/misc/option-aliases.sh | 61 ++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
create mode 100755 tests/misc/option-aliases.sh
diff --git a/tests/local.mk b/tests/local.mk
index a42a20fbeb..885787c3a8 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -353,6 +353,7 @@ all_tests = \
tests/nproc/nproc-positive.sh \
tests/nproc/nproc-override.sh \
tests/misc/numfmt.pl \
+ tests/misc/option-aliases.sh \
tests/od/od-N.sh \
tests/od/od-j.sh \
tests/od/od-multiple-t.sh \
diff --git a/tests/misc/option-aliases.sh b/tests/misc/option-aliases.sh
new file mode 100755
index 0000000000..d1c4f4b6c8
--- /dev/null
+++ b/tests/misc/option-aliases.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Make sure commands support all aliased options
+
+# Copyright (C) 2025 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see