From 4edd1f1f62c53eaaa0c3369a83c8a31c4b0f3043 Mon Sep 17 00:00:00 2001 From: AsynchronousMatrix Date: Thu, 10 Aug 2023 17:44:19 +0100 Subject: [PATCH] chore: update 'compile' luau test to support changes made to error handling --- tests/luau/compile.luau | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/luau/compile.luau b/tests/luau/compile.luau index f8e09f8..a949d23 100644 --- a/tests/luau/compile.luau +++ b/tests/luau/compile.luau @@ -10,7 +10,8 @@ assert( "expected `luau.compile` to return bytecode string" ) -assert( - string.byte(luau.compile(BROKEN_LUAU_CODE_BLOCK), 1, 1) == 0, - "expected errors to return with \0 byte, error message attached afterwards." -) +local success = pcall(function() + luau.compile(BROKEN_LUAU_CODE_BLOCK) +end) + +assert(success == false, "expected 'BROKEN_LUAU_CODE_BLOCK' to fail to compile into bytecode.")