From 407c9789e7b118be4382fbe4af83d25f82c2bd7d Mon Sep 17 00:00:00 2001 From: zongz Date: Thu, 29 Aug 2024 10:43:58 +0800 Subject: [PATCH] feat: add a test case for wildcard path Signed-off-by: zongz --- pkg/client/client_test.go | 3 +++ pkg/client/test_data/test_run_options/with_args/run_14/main.k | 1 + pkg/client/test_data/test_run_options/with_args/run_14/main1.k | 1 + .../test_data/test_run_options/with_args/run_14/sub/sub.k | 1 + .../test_data/test_run_options/with_args/run_14/sub/sub1/sub.k | 1 + pkg/client/test_data/test_run_options/with_args/run_14/temp | 1 + 6 files changed, 8 insertions(+) create mode 100644 pkg/client/test_data/test_run_options/with_args/run_14/main.k create mode 100644 pkg/client/test_data/test_run_options/with_args/run_14/main1.k create mode 100644 pkg/client/test_data/test_run_options/with_args/run_14/sub/sub.k create mode 100644 pkg/client/test_data/test_run_options/with_args/run_14/sub/sub1/sub.k create mode 100644 pkg/client/test_data/test_run_options/with_args/run_14/temp diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index def9cdf3..a094d021 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -2137,6 +2137,9 @@ func TestRunLocalWithArgs(t *testing.T) { {[]string{ filepath.Join(pkgPath, "with_args", "run_13", "temp"), }, []string{}, "", false, "", "temp: non-k-file"}, + {[]string{ + filepath.Join(pkgPath, "with_args", "run_14", "**", "*.k"), + }, []string{}, "", false, "", "main: main\nmain1: main1\nsub: sub\nsub1: sub1"}, } for _, test := range tests { diff --git a/pkg/client/test_data/test_run_options/with_args/run_14/main.k b/pkg/client/test_data/test_run_options/with_args/run_14/main.k new file mode 100644 index 00000000..cc7380ab --- /dev/null +++ b/pkg/client/test_data/test_run_options/with_args/run_14/main.k @@ -0,0 +1 @@ +main = "main" \ No newline at end of file diff --git a/pkg/client/test_data/test_run_options/with_args/run_14/main1.k b/pkg/client/test_data/test_run_options/with_args/run_14/main1.k new file mode 100644 index 00000000..40d4d83d --- /dev/null +++ b/pkg/client/test_data/test_run_options/with_args/run_14/main1.k @@ -0,0 +1 @@ +main1 = "main1" \ No newline at end of file diff --git a/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub.k b/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub.k new file mode 100644 index 00000000..fd778d79 --- /dev/null +++ b/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub.k @@ -0,0 +1 @@ +sub = "sub" \ No newline at end of file diff --git a/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub1/sub.k b/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub1/sub.k new file mode 100644 index 00000000..7e2e764b --- /dev/null +++ b/pkg/client/test_data/test_run_options/with_args/run_14/sub/sub1/sub.k @@ -0,0 +1 @@ +sub1 = "sub1" \ No newline at end of file diff --git a/pkg/client/test_data/test_run_options/with_args/run_14/temp b/pkg/client/test_data/test_run_options/with_args/run_14/temp new file mode 100644 index 00000000..a0e97235 --- /dev/null +++ b/pkg/client/test_data/test_run_options/with_args/run_14/temp @@ -0,0 +1 @@ +temp = "non-k-file" \ No newline at end of file