From 23c4c2f1aa7b5c0a55374a9185bcf69531694838 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Mon, 14 Feb 2022 10:51:20 +0100 Subject: [PATCH] Adds test for parent directory Signed-off-by: Simon Howe --- internal/flags/safe_relative_path_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/flags/safe_relative_path_test.go b/internal/flags/safe_relative_path_test.go index 86ba64da..a9d5f3fe 100644 --- a/internal/flags/safe_relative_path_test.go +++ b/internal/flags/safe_relative_path_test.go @@ -42,6 +42,8 @@ func TestRelativePath_Set(t *testing.T) { {"dot path", ".foo", "./.foo", false}, {"relative dot path", "./.foo", "./.foo", false}, {"current directory", ".", "./", false}, + {"parent directory", "..", "./", false}, + {"parent directory more qualified", "./..", "./", false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {