From 83ccb3c3345e84c59303fcd97db257d533905399 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Wed, 21 Jul 2021 18:18:20 -0700 Subject: [PATCH] Fix apropos tests for other Lua versions. --- test/repl.fnl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/repl.fnl b/test/repl.fnl index 6b054e5..6f7882a 100644 --- a/test/repl.fnl +++ b/test/repl.fnl @@ -127,16 +127,11 @@ "--use-bit-lib should make bitops fail in non-luajit")))) (fn test-apropos [] - (local (send) (wrap-repl)) + (local send (wrap-repl)) (let [res (. (send ",apropos table%.") 1)] - (l.assertEquals - (doto (icollect [item (res:gmatch "[^%s]+")] item) - (table.sort)) - ["table.concat" "table.insert" "table.move" - - "table.pack" "table.remove" "table.sort" - "table.unpack"] - "apropos returns all matching patterns")) + (each [_ k (ipairs ["table.concat" "table.insert" "table.remove" + "table.sort"])] + (l.assertStrContains res k))) (let [res (. (send ",apropos not-found") 1)] (l.assertEquals res "" "apropos returns no results for unknown pattern") (l.assertEquals -- 2.45.2