From 6ee2fc62eb98d0db04b693c07bf957bf67c740a7 Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Tue, 18 Apr 2017 13:14:18 +0300 Subject: [PATCH] test: add test for escaped characters (#493) --- test/simpleTest.js | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/test/simpleTest.js b/test/simpleTest.js index 8ff5a662..e05490b0 100644 --- a/test/simpleTest.js +++ b/test/simpleTest.js @@ -18,18 +18,29 @@ describe("simple", function() { test("simple2", ".class { a: b c d; }\n.two {}", [ [1, ".class { a: b c d; }\n.two {}", ""] ]); + test("escape characters (uppercase)", ".class { content: \"\\F10C\" }", [ + [1, ".class { content: \"\\F10C\" }", ""] + ]); + // Need uncomment after resolve https://github.com/css-modules/postcss-modules-local-by-default/issues/108 + /*test("escape characters (lowercase)", ".class { content: \"\\f10C\" }", [ + [1, ".class { content: \"\\f10C\" }", ""] + ]);*/ + // Need uncomment after resolve https://github.com/mathiasbynens/cssesc/issues/10 + /*test("escape characters (two)", ".class { content: \"\\F10C \\F10D\" }", [ + [1, ".class { content: \"\\F10C \\F10D\" }", ""] + ]);*/ testMinimize("minimized simple", ".class { a: b c d; }", [ [1, ".class{a:b c d}", ""] ]); - testError("error formatting", ".some {\n invalid css;\n}", function(err) { - assert.equal(err.message, [ - 'Unknown word (2:2)', - '', - ' 1 | .some {', - '> 2 | invalid css;', - ' | ^', - ' 3 | }', - '', - ].join('\n')); - }); + testError("error formatting", ".some {\n invalid css;\n}", function(err) { + assert.equal(err.message, [ + 'Unknown word (2:2)', + '', + ' 1 | .some {', + '> 2 | invalid css;', + ' | ^', + ' 3 | }', + '', + ].join('\n')); + }); });