Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunchen committed Sep 27, 2024
1 parent cba2fad commit e6aeecd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/moon/tests/cmd_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fn cmd_test() {
expect_test::expect![[r#"
[
${WORK_DIR}/cond_comp.in/moon.test, ok,
${WORK_DIR}/fuzzy_matching/moon.test, ok,
${WORK_DIR}/moon_build_package.in/moon.test, ok,
${WORK_DIR}/moon_info_001.in/moon.test, ok,
${WORK_DIR}/moon_info_002.in/moon.test, ok,
Expand Down
31 changes: 31 additions & 0 deletions crates/moon/tests/test_cases/fuzzy_matching/moon.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
$ moon test -p username/hello/x --sort-input --no-parallelize
x blackbox test
x inline test
x whitebox test
Total tests: 3, passed: 3, failed: 0.

$ moon test -p x --sort-input --no-parallelize
x blackbox test
x inline test
x whitebox test
x_y blackbox test
x_y inline test
x_y whitebox test
Total tests: 6, passed: 6, failed: 0.

$ moon test -p x/y --sort-input --no-parallelize
x_y blackbox test
x_y inline test
x_y whitebox test
Total tests: 3, passed: 3, failed: 0.

$ moon test -p u/h/x/y --sort-input --no-parallelize
x_y blackbox test
x_y inline test
x_y whitebox test
Total tests: 3, passed: 3, failed: 0.

$ moon test -p y --sort-input --no-parallelize
x_y blackbox test
x_y inline test
x_y whitebox test
y blackbox test
y inline test
y whitebox test
Total tests: 6, passed: 6, failed: 0.

$ moon test -p asdf --sort-input --no-parallelize

Warning: no test entry found

$ moon test -p y -f asdf --sort-input --no-parallelize
Total tests: 0, passed: 0, failed: 0.

Warning: cannot find file `asdf` in package `username/hello/x/y`, `username/hello/y`, --file only support exact matching

0 comments on commit e6aeecd

Please sign in to comment.