diff options
| author | OpportunityLiu <[email protected]> | 2019-06-08 13:34:02 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-08 13:34:02 +0800 |
| commit | 1af88102687e493cab40e62b0a2b8b7d42417ae6 (patch) | |
| tree | 272a80b424e68024a9ecda138159864d9659fe5a /tests/modules/lib/detect/test.lua | |
| parent | e165a8e43abed4eb2eca64c3b5adefb57cd65600 (diff) | |
improve test lib
Diffstat (limited to 'tests/modules/lib/detect/test.lua')
| -rwxr-xr-x | tests/modules/lib/detect/test.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/modules/lib/detect/test.lua b/tests/modules/lib/detect/test.lua index c44084ddc..b6937cfaf 100755 --- a/tests/modules/lib/detect/test.lua +++ b/tests/modules/lib/detect/test.lua @@ -1,14 +1,14 @@ import("lib.detect.find_toolname") -function main() - assert(find_toolname("xcrun -sdk macosx clang") == "clang") - assert(find_toolname("xcrun -sdk macosx clang++") == "clangxx") - assert(find_toolname("/usr/bin/arm-linux-gcc") == "gcc") - assert(find_toolname("/usr/bin/arm-linux-g++") == "gxx") - assert(find_toolname("/usr/bin/arm-linux-ar") == "ar") - assert(find_toolname("link.exe -lib") == "link") - assert(find_toolname("arm-android-clang++") == "clangxx") - assert(find_toolname("pkg-config") == "pkg_config") - assert(find_toolname("gcc-5") == "gcc") +function test_find_toolname(t) + t:are_equal(find_toolname("xcrun -sdk macosx clang"), "clang") + t:are_equal(find_toolname("xcrun -sdk macosx clang++"), "clangxx") + t:are_equal(find_toolname("/usr/bin/arm-linux-gcc"), "gcc") + t:are_equal(find_toolname("/usr/bin/arm-linux-g++"), "gxx") + t:are_equal(find_toolname("/usr/bin/arm-linux-ar"), "ar") + t:are_equal(find_toolname("link.exe -lib"), "link") + t:are_equal(find_toolname("arm-android-clang++"), "clangxx") + t:are_equal(find_toolname("pkg-config"), "pkg_config") + t:are_equal(find_toolname("gcc-5"), "gcc") end |
