mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-19 11:13:49 +01:00
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.
This commit is contained in:
parent
d17d70d6ed
commit
c9a411397e
1 changed files with 8 additions and 0 deletions
|
@ -1408,6 +1408,10 @@ TEST_CASE_FIXTURE(Fixture, "transpile_for_in_multiple_types")
|
||||||
|
|
||||||
TEST_CASE_FIXTURE(Fixture, "transpile_string_interp")
|
TEST_CASE_FIXTURE(Fixture, "transpile_string_interp")
|
||||||
{
|
{
|
||||||
|
ScopedFastFlag fflags[] = {
|
||||||
|
{FFlag::LuauStoreCSTData, true},
|
||||||
|
{FFlag::LexerFixInterpStringStart, true},
|
||||||
|
};
|
||||||
std::string code = R"( local _ = `hello {name}` )";
|
std::string code = R"( local _ = `hello {name}` )";
|
||||||
|
|
||||||
CHECK_EQ(code, transpile(code, {}, true).code);
|
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")
|
TEST_CASE_FIXTURE(Fixture, "transpile_string_literal_escape")
|
||||||
{
|
{
|
||||||
|
ScopedFastFlag fflags[] = {
|
||||||
|
{FFlag::LuauStoreCSTData, true},
|
||||||
|
{FFlag::LexerFixInterpStringStart, true},
|
||||||
|
};
|
||||||
std::string code = R"( local _ = ` bracket = \{, backtick = \` = {'ok'} ` )";
|
std::string code = R"( local _ = ` bracket = \{, backtick = \` = {'ok'} ` )";
|
||||||
|
|
||||||
CHECK_EQ(code, transpile(code, {}, true).code);
|
CHECK_EQ(code, transpile(code, {}, true).code);
|
||||||
|
|
Loading…
Add table
Reference in a new issue