From 210c000b8c121592636db3d87aa7dd912092986c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Sun, 11 Jan 2026 18:51:19 +0000 Subject: [PATCH] tests: date: test nested parenthesis comment handling * tests/date/date.pl: Add test cases. Suggested by Sylvestre Ledru. --- tests/date/date.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/date/date.pl b/tests/date/date.pl index 0343cb913..8a5e57363 100755 --- a/tests/date/date.pl +++ b/tests/date/date.pl @@ -334,6 +334,11 @@ my @Tests = # Text enclosed in parentheses is treated as a comment ['paren-4', "-d '2026(this is a comment)-01-05' -u +'%Y-%m-%d'", {OUT=>"2026-01-05"}], + + # Nested comments are supported + ['paren-5', "-d '((nested))2026-01-05' -u +'%Y-%m-%d'", + {OUT=>"2026-01-05"}], + ['paren-6', "-d '((nested)2026-01-05)' +'%H:%M:%S'", {OUT=>"00:00:00"}], ); # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364.