diff options
| author | ruki <[email protected]> | 2024-04-17 22:53:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-17 22:53:22 +0800 |
| commit | 2346d257b7d3a8d9be845eeea7763113647611df (patch) | |
| tree | d6d0739aaf61eedbc0dd4959927fd01d94d0b336 /tests/modules/private/select_script | |
| parent | 08250fcd9265cc7fe10f890199c5847a79491bef (diff) | |
improve exclude pattern
Diffstat (limited to 'tests/modules/private/select_script')
| -rw-r--r-- | tests/modules/private/select_script/test.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/modules/private/select_script/test.lua b/tests/modules/private/select_script/test.lua index 3e9128f01..ff9b25e59 100644 --- a/tests/modules/private/select_script/test.lua +++ b/tests/modules/private/select_script/test.lua @@ -22,8 +22,6 @@ function test_plat_only(t) t:require_not(_match_patterns("!mac*", {plat = "macosx"})) t:require(_match_patterns("!macosx", {plat = "linux"})) t:require(_match_patterns("!macosx,!android", {plat = "linux"})) - t:require_not(_match_patterns("!macosx,!android", {plat = "android"})) - t:require_not(_match_patterns("!macosx,!android", {plat = "macosx"})) t:require(_match_patterns("!mac*", {plat = "linux"})) end @@ -39,7 +37,6 @@ function test_plat_arch(t) t:require_not(_match_patterns("!macosx|x86_64", {plat = "macosx", arch = "x86_64"})) t:require_not(_match_patterns("!mac*|x86_64", {plat = "macosx", arch = "x86_64"})) t:require(_match_patterns("!macosx|x86_64", {plat = "linux", arch = "x86_64"})) - t:require_not(_match_patterns("!macosx|x86_64,!linux|x86_64", {plat = "linux", arch = "x86_64"})) t:require(_match_patterns("!mac*|x86_64", {plat = "linux", arch = "x86_64"})) t:require(_match_patterns("macosx|!i386", {plat = "macosx", arch = "x86_64"})) t:require(_match_patterns("!macosx|!i386", {plat = "linux", arch = "x86_64"})) @@ -119,6 +116,7 @@ function test_plat_arch_subhost_subarch(t) end function test_logical_expr(t) + t:require(_match_patterns("!macosx|x86_64,!iphoneos|arm64", {plat = "linux", arch = "x86_64"})) t:require(_match_patterns("!wasm|!arm* and !cross|!arm*", {plat = "linux", arch = "x86_64"})) t:require_not(_match_patterns("!wasm|!arm* and !cross|!arm*", {plat = "linux", arch = "arm64"})) t:require_not(_match_patterns("!wasm|!arm* and !cross|!arm*", {plat = "wasm", arch = "x86_64"})) @@ -126,5 +124,10 @@ function test_logical_expr(t) t:require_not(_match_patterns("!android@macosx or !android@linux", {plat = "android", subhost = "macosx"})) t:require(_match_patterns("@macosx|x86_64 or @linux|x86_64", {subhost = "macosx", subarch = "x86_64"})) t:require(_match_patterns("@macosx or @linux", {subhost = "macosx"})) + t:require(_match_patterns("!wasm|!arm* or (!cross|!arm* or linux)", {plat = "linux", arch = "arm64"})) + t:require_not(_match_patterns("!wasm|!arm* or (!cross|!arm* and !linux)", {plat = "linux", arch = "arm64"})) + t:require_not(_match_patterns("!macosx|x86_64 and !linux|x86_64", {plat = "linux", arch = "x86_64"})) + t:require_not(_match_patterns("!macosx and !android", {plat = "android"})) + t:require_not(_match_patterns("!macosx and !android", {plat = "macosx"})) end |
