From cba2fada2a0a356e3a75f740fcc1c255b60b8fe9 Mon Sep 17 00:00:00 2001 From: Li Junchen Date: Fri, 27 Sep 2024 15:30:43 +0800 Subject: [PATCH] add tests --- .../tests/test_cases/fuzzy_matching/.gitignore | 2 ++ .../moon/tests/test_cases/fuzzy_matching/README.md | 1 + .../tests/test_cases/fuzzy_matching/moon.mod.json | 10 ++++++++++ .../moon/tests/test_cases/fuzzy_matching/moon.test | 14 ++++++++++++++ .../tests/test_cases/fuzzy_matching/src/x/lib.mbt | 3 +++ .../test_cases/fuzzy_matching/src/x/moon.pkg.json | 1 + .../test_cases/fuzzy_matching/src/x/x_test.mbt | 3 +++ .../test_cases/fuzzy_matching/src/x/x_wbtest.mbt | 3 +++ .../test_cases/fuzzy_matching/src/x/y/lib.mbt | 3 +++ .../fuzzy_matching/src/x/y/moon.pkg.json | 1 + .../test_cases/fuzzy_matching/src/x/y/x_y_test.mbt | 3 +++ .../fuzzy_matching/src/x/y/x_y_wbtest.mbt | 3 +++ .../tests/test_cases/fuzzy_matching/src/y/lib.mbt | 3 +++ .../test_cases/fuzzy_matching/src/y/moon.pkg.json | 1 + .../test_cases/fuzzy_matching/src/y/y_test.mbt | 3 +++ .../test_cases/fuzzy_matching/src/y/y_wbtest.mbt | 3 +++ 16 files changed, 57 insertions(+) create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/.gitignore create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/README.md create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/moon.mod.json create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/moon.test create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/lib.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/moon.pkg.json create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/x_test.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/x_wbtest.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/y/lib.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/y/moon.pkg.json create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_test.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_wbtest.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/y/lib.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/y/moon.pkg.json create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/y/y_test.mbt create mode 100644 crates/moon/tests/test_cases/fuzzy_matching/src/y/y_wbtest.mbt diff --git a/crates/moon/tests/test_cases/fuzzy_matching/.gitignore b/crates/moon/tests/test_cases/fuzzy_matching/.gitignore new file mode 100644 index 00000000..b1283a74 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/.gitignore @@ -0,0 +1,2 @@ +target/ +.mooncakes/ diff --git a/crates/moon/tests/test_cases/fuzzy_matching/README.md b/crates/moon/tests/test_cases/fuzzy_matching/README.md new file mode 100644 index 00000000..ae00983f --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/README.md @@ -0,0 +1 @@ +# username/hello \ No newline at end of file diff --git a/crates/moon/tests/test_cases/fuzzy_matching/moon.mod.json b/crates/moon/tests/test_cases/fuzzy_matching/moon.mod.json new file mode 100644 index 00000000..9e55a905 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/moon.mod.json @@ -0,0 +1,10 @@ +{ + "name": "username/hello", + "version": "0.1.0", + "readme": "README.md", + "repository": "", + "license": "", + "keywords": [], + "description": "", + "source": "src" +} \ No newline at end of file diff --git a/crates/moon/tests/test_cases/fuzzy_matching/moon.test b/crates/moon/tests/test_cases/fuzzy_matching/moon.test new file mode 100644 index 00000000..62946d5b --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/moon.test @@ -0,0 +1,14 @@ + $ moon test -p username/hello/x --sort-input --no-parallelize + + $ moon test -p x --sort-input --no-parallelize + + $ moon test -p x/y --sort-input --no-parallelize + + $ moon test -p u/h/x/y --sort-input --no-parallelize + + $ moon test -p y --sort-input --no-parallelize + + $ moon test -p asdf --sort-input --no-parallelize + + $ moon test -p y -f asdf --sort-input --no-parallelize + diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/lib.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/lib.mbt new file mode 100644 index 00000000..f7c98cdb --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/lib.mbt @@ -0,0 +1,3 @@ +test { + println("x inline test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/moon.pkg.json b/crates/moon/tests/test_cases/fuzzy_matching/src/x/moon.pkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/moon.pkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_test.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_test.mbt new file mode 100644 index 00000000..7a721233 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_test.mbt @@ -0,0 +1,3 @@ +test { + println("x blackbox test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_wbtest.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_wbtest.mbt new file mode 100644 index 00000000..23aaf97c --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/x_wbtest.mbt @@ -0,0 +1,3 @@ +test { + println("x whitebox test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/lib.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/lib.mbt new file mode 100644 index 00000000..5691f57c --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/lib.mbt @@ -0,0 +1,3 @@ +test { + println("x_y inline test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/moon.pkg.json b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/moon.pkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/moon.pkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_test.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_test.mbt new file mode 100644 index 00000000..b2f3b541 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_test.mbt @@ -0,0 +1,3 @@ +test { + println("x_y blackbox test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_wbtest.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_wbtest.mbt new file mode 100644 index 00000000..bbcc3333 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/x/y/x_y_wbtest.mbt @@ -0,0 +1,3 @@ +test { + println("x_y whitebox test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/y/lib.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/y/lib.mbt new file mode 100644 index 00000000..0a295398 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/y/lib.mbt @@ -0,0 +1,3 @@ +test { + println("y inline test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/y/moon.pkg.json b/crates/moon/tests/test_cases/fuzzy_matching/src/y/moon.pkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/y/moon.pkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_test.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_test.mbt new file mode 100644 index 00000000..8f5dd765 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_test.mbt @@ -0,0 +1,3 @@ +test { + println("y blackbox test") +} diff --git a/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_wbtest.mbt b/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_wbtest.mbt new file mode 100644 index 00000000..1d6864c4 --- /dev/null +++ b/crates/moon/tests/test_cases/fuzzy_matching/src/y/y_wbtest.mbt @@ -0,0 +1,3 @@ +test { + println("y whitebox test") +}