Bug 1435144 - Fix the last part of the prefs parser gtest. r=glandium

MozReview-Commit-ID: KPG5SX2vwce
This commit is contained in:
Nicholas Nethercote 2018-02-02 14:48:13 +11:00
Родитель caba23a6ce
Коммит 00fa66ab0c
1 изменённых файлов: 7 добавлений и 26 удалений

Просмотреть файл

@ -497,48 +497,29 @@ pref("parse.error", true);;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// In all of the following we have a \n, a \r, a \r\n, and then an error, so // In all of the following we have a \n, a \r, a \r\n, and then an error, so
// the error is on line 4. // the error is on line 4. (Note: these ones don't use raw string literals
// because MSVC somehow swallows any \r that appears in them.)
// XXX: these are temporarily commented out due to differing results on Windows P("\n \r \r\n bad",
#if 0
P(R"(
bad
)",
"test:4: prefs parse error: unknown keyword" "test:4: prefs parse error: unknown keyword"
); );
P(R"(# P("#\n#\r#\r\n bad",
# #
bad
)",
"test:4: prefs parse error: unknown keyword" "test:4: prefs parse error: unknown keyword"
); );
P(R"(// P("//\n//\r//\r\n bad",
// //
bad
)",
"test:4: prefs parse error: unknown keyword" "test:4: prefs parse error: unknown keyword"
); );
P(R"(/* P("/*\n \r \r\n*/ bad",
*/ bad
)",
"test:4: prefs parse error: unknown keyword" "test:4: prefs parse error: unknown keyword"
); );
// Note: the escape sequences do *not* affect the line number. // Note: the escape sequences do *not* affect the line number.
P(R"(pref("foo\n P("pref(\"foo\\n\n foo\\r\r foo\\r\\n\r\n foo\", bad);",
\r foo\r\n
foo", bad
)",
"test:4: prefs parse error: unknown keyword" "test:4: prefs parse error: unknown keyword"
); );
#endif
// clang-format on // clang-format on
} }