From c9a411397e0e48fc8321f958dafb9666bc6eef6a Mon Sep 17 00:00:00 2001 From: Aviral Goel Date: Fri, 7 Feb 2025 16:03:50 -0800 Subject: [PATCH] Explicitly enable FFlags in interpolated string Transpiler tests This test fails due to a bad interaction when `FFlagLuauStoreCSTData` is enabled, whilst `FFlagLexerFixInterpStringStart` is disabled. The OSS test suite, when run with `--fflags=true`, enables all flags starting with a `Luau` prefix, but does not enable any other flag. To resolve this, we explicitly enable both fflags for the failing interpolated string test cases. As a consequence, we technically lose the check that these tests pass when all flags are disabled. --- tests/Transpiler.test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Transpiler.test.cpp b/tests/Transpiler.test.cpp index ebbfd4dc..3505f96d 100644 --- a/tests/Transpiler.test.cpp +++ b/tests/Transpiler.test.cpp @@ -1408,6 +1408,10 @@ TEST_CASE_FIXTURE(Fixture, "transpile_for_in_multiple_types") TEST_CASE_FIXTURE(Fixture, "transpile_string_interp") { + ScopedFastFlag fflags[] = { + {FFlag::LuauStoreCSTData, true}, + {FFlag::LexerFixInterpStringStart, true}, + }; std::string code = R"( local _ = `hello {name}` )"; CHECK_EQ(code, transpile(code, {}, true).code); @@ -1452,6 +1456,10 @@ TEST_CASE_FIXTURE(Fixture, "transpile_string_interp_multiline_escape") TEST_CASE_FIXTURE(Fixture, "transpile_string_literal_escape") { + ScopedFastFlag fflags[] = { + {FFlag::LuauStoreCSTData, true}, + {FFlag::LexerFixInterpStringStart, true}, + }; std::string code = R"( local _ = ` bracket = \{, backtick = \` = {'ok'} ` )"; CHECK_EQ(code, transpile(code, {}, true).code);