Browse Source

improve expression test cases

Evan You 11 years ago
parent
commit
a8419063d4
1 changed files with 12 additions and 3 deletions
  1. 12 3
      test/unit/expression_spec.js

+ 12 - 3
test/unit/expression_spec.js

@@ -37,12 +37,21 @@ var testCases = [
     expected: 'worked'
   },
   {
-    // inline string
-    exp: "a + 'hello'",
+    // inline string with newline
+    exp: "a + 'hel\nlo'",
     scope: {
       a: 'inline '
     },
-    expected: 'inline hello'
+    expected: 'inline hel\nlo'
+  },
+  {
+    // dollar signs and underscore
+    exp: "_a + ' ' + $b",
+    scope: {
+      _a: 'underscore',
+      $b: 'dollar'
+    },
+    expected: 'underscore dollar'
   },
   {
     // complex with nested values