From 7a82652d9f02b83abf9c06a1ec739c2428a5c0f4 Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Sat, 17 Aug 2024 12:39:53 -0400 Subject: [PATCH] Add Explicit Test For Empty Inverse Prefix --- flag_bool_with_inverse_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flag_bool_with_inverse_test.go b/flag_bool_with_inverse_test.go index d1d8751419..ffa91ce15d 100644 --- a/flag_bool_with_inverse_test.go +++ b/flag_bool_with_inverse_test.go @@ -389,6 +389,13 @@ func TestBoolWithInverseString(t *testing.T) { inversePrefix: "nope-", expected: "--[nope-]env\t", }, + { + testName: "empty inverse prefix", + flagName: "env", + required: true, + inversePrefix: "", + expected: "--[no-]env\t", + }, } for _, tc := range tcs {