From bb9bc06fd5753e7338e9b3230b2fc3e3ce971a05 Mon Sep 17 00:00:00 2001 From: Mack Wang Date: Tue, 7 Apr 2026 21:11:00 -0700 Subject: [PATCH] feat: testcase for whitelisted chars --- .gitattributes | 1 + conf.json | 20 ++++++++++++++++++++ expected.json | 10 ++++++++++ nonascii.txt | 1 + 4 files changed, 32 insertions(+) create mode 100644 .gitattributes create mode 100644 conf.json create mode 100644 expected.json create mode 100644 nonascii.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c023f83 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +nonascii.txt text diff --git a/conf.json b/conf.json new file mode 100644 index 0000000..10836a3 --- /dev/null +++ b/conf.json @@ -0,0 +1,20 @@ +{ + "stages": [ + { + "name": "healthcheck", + "executor": { + "name": "sandbox", + "with": { + "default": { + "args": [ + "/tmp/repo-health-checker", + "-root=.", + "-allowedDomainList=example.com", + "-whitelistedChars=\u6d4b" + ] + } + } + } + } + ] +} diff --git a/expected.json b/expected.json new file mode 100644 index 0000000..0b0f7ee --- /dev/null +++ b/expected.json @@ -0,0 +1,10 @@ +{ + "failed": false, + "msgContains": [ + "### Non-ASCII Characters File Check Passed" + ], + "msgNotContains": [ + "### Non-ASCII Characters File Check Failed" + ], + "stderrContains": [] +} diff --git a/nonascii.txt b/nonascii.txt new file mode 100644 index 0000000..9ea08c4 --- /dev/null +++ b/nonascii.txt @@ -0,0 +1 @@ +Allowed non-ASCII: 测