diff options
| author | ruki <[email protected]> | 2024-04-17 22:51:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-17 22:51:45 +0800 |
| commit | 08250fcd9265cc7fe10f890199c5847a79491bef (patch) | |
| tree | 58ec5103f0c6f0f1d567af621193f029a901341e /tests/modules/private/select_script | |
| parent | 2190b08db954738da36feeb820e8771383caa5e0 (diff) | |
improve select_script test
Diffstat (limited to 'tests/modules/private/select_script')
| -rw-r--r-- | tests/modules/private/select_script/test.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/modules/private/select_script/test.lua b/tests/modules/private/select_script/test.lua index 50ff3acee..3e9128f01 100644 --- a/tests/modules/private/select_script/test.lua +++ b/tests/modules/private/select_script/test.lua @@ -39,7 +39,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(_match_patterns("!macosx|x86_64,!iphoneos|arm64", {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"})) @@ -55,7 +54,6 @@ end function test_subhost_only(t) t:require(_match_patterns("@*", {subhost = "macosx"})) t:require(_match_patterns("@macosx", {subhost = "macosx"})) - t:require(_match_patterns("@macosx,@linux", {subhost = "macosx"})) t:require(_match_patterns("@mac*", {subhost = "macosx"})) t:require_not(_match_patterns("@macosx", {subhost = "linux"})) t:require_not(_match_patterns("@linux", {subhost = "macosx"})) @@ -68,7 +66,6 @@ end function test_subhost_subarch(t) t:require(_match_patterns("@*|x86_64", {subhost = "macosx", subarch = "x86_64"})) t:require(_match_patterns("@macosx|x86_64", {subhost = "macosx", subarch = "x86_64"})) - t:require(_match_patterns("@macosx|x86_64,@linux|x86_64", {subhost = "macosx", subarch = "x86_64"})) t:require(_match_patterns("@macosx|x86_*", {subhost = "macosx", subarch = "x86_64"})) t:require_not(_match_patterns("@macosx|x86_64", {subhost = "linux", subarch = "x86_64"})) t:require_not(_match_patterns("@macosx|i386", {subhost = "macosx", subarch = "x86_64"})) @@ -89,7 +86,6 @@ end function test_plat_subhost(t) t:require(_match_patterns("*@macosx", {plat = "macosx", subhost = "macosx"})) t:require(_match_patterns("android@macosx", {plat = "android", subhost = "macosx"})) - t:require_not(_match_patterns("!android@macosx,!android@linux", {plat = "android", subhost = "macosx"})) t:require(_match_patterns("android@macosx,linux", {plat = "android", subhost = "linux"})) t:require(_match_patterns("android@mac*", {plat = "android", subhost = "macosx"})) t:require(_match_patterns("android@!macosx", {plat = "android", subhost = "linux"})) @@ -126,5 +122,9 @@ function test_logical_expr(t) 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"})) + t:require(_match_patterns("!macosx|x86_64 or !iphoneos|arm64", {plat = "linux", arch = "x86_64"})) + 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"})) end |
