1 From 7b9f5ecd536c101d7bbbf357530e7e034a5a5024 Mon Sep 17 00:00:00 2001
2 From: Ruslan Spivak <rspivak@Ruslans-MacBook-Air.local>
3 Date: Thu, 25 Apr 2013 21:54:37 -0400
4 Subject: [PATCH 3/8] Add tests for https://github.com/rspivak/slimit/issues/47
7 src/slimit/tests/test_minifier.py | 34 ++++++++++++++++++++++++++++---
8 1 file changed, 31 insertions(+), 3 deletions(-)
10 diff --git a/src/slimit/tests/test_minifier.py b/src/slimit/tests/test_minifier.py
11 index e1b3e1d..e999335 100644
12 --- a/src/slimit/tests/test_minifier.py
13 +++ b/src/slimit/tests/test_minifier.py
14 @@ -435,8 +435,36 @@ class MinifierTestCase(unittest.TestCase):
15 'this.last=names[1];}};')
18 - ('testObj[":"] = undefined;', 'testObj[":"]=undefined;'),
19 - ('testObj["::"] = undefined;', 'testObj["::"]=undefined;'),
21 + # https://github.com/rspivak/slimit/issues/47 - might be a Python 3
23 + ('testObj[":"] = undefined; // Breaks', 'testObj[":"]=undefined;'),
24 + ('testObj["::"] = undefined; // Breaks', 'testObj["::"]=undefined;'),
25 + ('testObj["a:"] = undefined; // Breaks', 'testObj["a:"]=undefined;'),
26 + ('testObj["."] = undefined; // OK', 'testObj["."]=undefined;'),
27 + ('testObj["{"] = undefined; // OK', 'testObj["{"]=undefined;'),
28 + ('testObj["}"] = undefined; // OK', 'testObj["}"]=undefined;'),
29 + ('testObj["["] = undefined; // Breaks', 'testObj["["]=undefined;'),
30 + ('testObj["]"] = undefined; // Breaks', 'testObj["]"]=undefined;'),
31 + ('testObj["("] = undefined; // OK', 'testObj["("]=undefined;'),
32 + ('testObj[")"] = undefined; // OK', 'testObj[")"]=undefined;'),
33 + ('testObj["="] = undefined; // Breaks', 'testObj["="]=undefined;'),
34 + ('testObj["-"] = undefined; // OK', 'testObj["-"]=undefined;'),
35 + ('testObj["+"] = undefined; // OK', 'testObj["+"]=undefined;'),
36 + ('testObj["*"] = undefined; // OK', 'testObj["*"]=undefined;'),
37 + ('testObj["/"] = undefined; // OK', 'testObj["/"]=undefined;'),
38 + (r'testObj["\\"] = undefined; // Breaks', r'testObj["\\"]=undefined;'),
39 + ('testObj["%"] = undefined; // OK', 'testObj["%"]=undefined;'),
40 + ('testObj["<"] = undefined; // Breaks', 'testObj["<"]=undefined;'),
41 + ('testObj[">"] = undefined; // Breaks', 'testObj[">"]=undefined;'),
42 + ('testObj["!"] = undefined; // OK', 'testObj["!"]=undefined;'),
43 + ('testObj["?"] = undefined; // Breaks', 'testObj["?"]=undefined;'),
44 + ('testObj[","] = undefined; // OK', 'testObj[","]=undefined;'),
45 + ('testObj["@"] = undefined; // Breaks', 'testObj["@"]=undefined;'),
46 + ('testObj["#"] = undefined; // OK', 'testObj["#"]=undefined;'),
47 + ('testObj["&"] = undefined; // OK', 'testObj["&"]=undefined;'),
48 + ('testObj["|"] = undefined; // OK', 'testObj["|"]=undefined;'),
49 + ('testObj["~"] = undefined; // OK', 'testObj["~"]=undefined;'),
50 + ('testObj["`"] = undefined; // Breaks', 'testObj["`"]=undefined;'),
51 + ('testObj["."] = undefined; // OK', 'testObj["."]=undefined;'),