Permalink
Browse files

Updating tests

  • Loading branch information...
1 parent 3e5d407 commit d930505ec5bc582bb7ec70d05769172f620933be @jbboehr committed Mar 12, 2012
Showing with 93 additions and 89 deletions.
  1. +3 −0 .gitmodules
  2. +1 −1 generate-tests.php
  3. +1 −0 spec
  4. +1 −1 tests/mustache-spec-comments-indented-inline.phpt
  5. +1 −1 tests/mustache-spec-comments-indented-multiline-standalone.phpt
  6. +1 −1 tests/mustache-spec-comments-indented-standalone.phpt
  7. +1 −1 tests/mustache-spec-comments-multiline-standalone.phpt
  8. +1 −1 tests/mustache-spec-comments-multiline.phpt
  9. +1 −1 tests/mustache-spec-comments-standalone-line-endings.phpt
  10. +1 −1 tests/mustache-spec-comments-standalone-without-newline.phpt
  11. +1 −1 tests/mustache-spec-comments-standalone.phpt
  12. +1 −1 tests/mustache-spec-comments-surrounding-whitespace.phpt
  13. +1 −1 tests/mustache-spec-delimiters-indented-standalone-tag.phpt
  14. +1 −1 tests/mustache-spec-delimiters-inverted-sections.phpt
  15. +1 −1 tests/mustache-spec-delimiters-outlying-whitespace-inline.phpt
  16. +1 −1 tests/mustache-spec-delimiters-partial-inheritence.phpt
  17. +1 −1 tests/mustache-spec-delimiters-post-partial-behavior.phpt
  18. +1 −1 tests/mustache-spec-delimiters-sections.phpt
  19. +1 −1 tests/mustache-spec-delimiters-special-characters.phpt
  20. +1 −1 tests/mustache-spec-delimiters-standalone-line-endings.phpt
  21. +1 −1 tests/mustache-spec-delimiters-standalone-tag.phpt
  22. +1 −1 tests/mustache-spec-delimiters-standalone-without-newline.phpt
  23. +1 −1 tests/mustache-spec-delimiters-surrounding-whitespace.phpt
  24. +1 −1 tests/mustache-spec-interpolation-ampersand-context-miss-interpolation.phpt
  25. +1 −1 tests/mustache-spec-interpolation-ampersand-decimal-interpolation.phpt
  26. +1 −1 tests/mustache-spec-interpolation-ampersand-integer-interpolation.phpt
  27. +1 −1 tests/mustache-spec-interpolation-ampersand-standalone.phpt
  28. +1 −1 tests/mustache-spec-interpolation-ampersand-surrounding-whitespace.phpt
  29. +1 −1 tests/mustache-spec-interpolation-ampersand.phpt
  30. +1 −1 tests/mustache-spec-interpolation-basic-context-miss-interpolation.phpt
  31. +1 −1 tests/mustache-spec-interpolation-basic-decimal-interpolation.phpt
  32. +1 −1 tests/mustache-spec-interpolation-basic-integer-interpolation.phpt
  33. +1 −1 tests/mustache-spec-interpolation-basic-interpolation.phpt
  34. +1 −1 tests/mustache-spec-interpolation-dotted-names-ampersand-interpolation.phpt
  35. +1 −1 tests/mustache-spec-interpolation-dotted-names-arbitrary-depth.phpt
  36. +1 −1 tests/mustache-spec-interpolation-dotted-names-basic-interpolation.phpt
  37. +1 −1 tests/mustache-spec-interpolation-dotted-names-broken-chain-resolution.phpt
  38. +1 −1 tests/mustache-spec-interpolation-dotted-names-broken-chains.phpt
  39. +1 −1 tests/mustache-spec-interpolation-dotted-names-initial-resolution.phpt
  40. +1 −1 tests/mustache-spec-interpolation-dotted-names-triple-mustache-interpolation.phpt
  41. +1 −1 tests/mustache-spec-interpolation-html-escaping.phpt
  42. +1 −1 tests/mustache-spec-interpolation-interpolation-standalone.phpt
  43. +1 −1 tests/mustache-spec-interpolation-interpolation-surrounding-whitespace.phpt
  44. +1 −1 tests/mustache-spec-interpolation-no-interpolation.phpt
  45. +1 −1 tests/mustache-spec-interpolation-triple-mustache-context-miss-interpolation.phpt
  46. +1 −1 tests/mustache-spec-interpolation-triple-mustache-decimal-interpolation.phpt
  47. +1 −1 tests/mustache-spec-interpolation-triple-mustache-integer-interpolation.phpt
  48. +1 −1 tests/mustache-spec-interpolation-triple-mustache-standalone.phpt
  49. +1 −1 tests/mustache-spec-interpolation-triple-mustache-surrounding-whitespace.phpt
  50. +1 −1 tests/mustache-spec-interpolation-triple-mustache.phpt
  51. +1 −1 tests/mustache-spec-inverted-context-misses.phpt
  52. +1 −1 tests/mustache-spec-inverted-dotted-names-broken-chains.phpt
  53. +1 −1 tests/mustache-spec-inverted-dotted-names-falsey.phpt
  54. +1 −1 tests/mustache-spec-inverted-dotted-names-truthy.phpt
  55. +1 −1 tests/mustache-spec-inverted-doubled.phpt
  56. +1 −1 tests/mustache-spec-inverted-empty-list.phpt
  57. +1 −1 tests/mustache-spec-inverted-falsey.phpt
  58. +1 −1 tests/mustache-spec-inverted-indented-inline-sections.phpt
  59. +1 −1 tests/mustache-spec-inverted-internal-whitespace.phpt
  60. +1 −1 tests/mustache-spec-inverted-nested-falsey.phpt
  61. +1 −1 tests/mustache-spec-inverted-nested-truthy.phpt
  62. +1 −1 tests/mustache-spec-inverted-standalone-indented-lines.phpt
  63. +1 −1 tests/mustache-spec-inverted-standalone-line-endings.phpt
  64. +1 −1 tests/mustache-spec-inverted-standalone-lines.phpt
  65. +1 −1 tests/mustache-spec-inverted-standalone-without-newline.phpt
  66. +1 −1 tests/mustache-spec-inverted-standalone-without-previous-line.phpt
  67. +1 −1 tests/mustache-spec-inverted-surrounding-whitespace.phpt
  68. +1 −1 tests/mustache-spec-partials-basic-behavior.phpt
  69. +1 −1 tests/mustache-spec-partials-inline-indentation.phpt
  70. +1 −1 tests/mustache-spec-partials-standalone-indentation.phpt
  71. +1 −1 tests/mustache-spec-partials-standalone-line-endings.phpt
  72. +1 −1 tests/mustache-spec-partials-standalone-without-newline.phpt
  73. +1 −1 tests/mustache-spec-partials-standalone-without-previous-line.phpt
  74. +1 −1 tests/mustache-spec-partials-surrounding-whitespace.phpt
  75. +1 −1 tests/mustache-spec-sections-context.phpt
  76. +1 −1 tests/mustache-spec-sections-deeply-nested-contexts.phpt
  77. +1 −1 tests/mustache-spec-sections-dotted-names-broken-chains.phpt
  78. +1 −1 tests/mustache-spec-sections-dotted-names-falsey.phpt
  79. +1 −1 tests/mustache-spec-sections-dotted-names-truthy.phpt
  80. +1 −1 tests/mustache-spec-sections-doubled.phpt
  81. +1 −1 tests/mustache-spec-sections-indented-inline-sections.phpt
  82. +1 −1 tests/mustache-spec-sections-indented-standalone-lines.phpt
  83. +1 −1 tests/mustache-spec-sections-internal-whitespace.phpt
  84. +1 −1 tests/mustache-spec-sections-nested-falsey.phpt
  85. +1 −1 tests/mustache-spec-sections-nested-truthy.phpt
  86. +1 −1 tests/mustache-spec-sections-standalone-line-endings.phpt
  87. +1 −1 tests/mustache-spec-sections-standalone-lines.phpt
  88. +1 −1 tests/mustache-spec-sections-standalone-without-newline.phpt
  89. +1 −1 tests/mustache-spec-sections-standalone-without-previous-line.phpt
  90. +1 −1 tests/mustache-spec-sections-surrounding-whitespace.phpt
  91. +1 −1 tests/mustache-spec-sections-truthy.phpt
View
@@ -1,3 +1,6 @@
[submodule "mustache"]
path = mustache
url = git://github.com/jbboehr/libmustache.git
+[submodule "spec"]
+ path = spec
+ url = git://github.com/mustache/spec.git
View
@@ -56,7 +56,7 @@
foreach( preg_split('/\s+/', $test['expected']) as $chunk ) {
$tmp[] = preg_quote($chunk, '/');
}
- $output .= join("\s+", $tmp);
+ $output .= join("\s*", $tmp);
$cleanName = strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/', '-', $test['name']), '-'));
file_put_contents('./tests/mustache-spec-' . $spec . '-' . $cleanName . '.phpt', $output);
1 spec
Submodule spec added at 9b1bc7
@@ -21,4 +21,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\s+12\s+
+\s*12\s*
@@ -26,4 +26,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -24,4 +24,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -26,4 +26,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -24,4 +24,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-1234567890\s+
+1234567890\s*
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\|
+\|\s*\|
@@ -21,4 +21,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\!\s+
+\!\s*
@@ -24,4 +24,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -19,4 +19,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-12345\s+67890
+12345\s*67890
@@ -24,4 +24,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -40,4 +40,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\[\s+I\s+got\s+interpolated\.\s+\|data\|\s+\{\{data\}\}\s+I\s+got\s+interpolated\.\s+\]\s+
+\[\s*I\s*got\s*interpolated\.\s*\|data\|\s*\{\{data\}\}\s*I\s*got\s*interpolated\.\s*\]\s*
@@ -21,4 +21,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\s+\|\s+
+\s*\|\s*
@@ -29,4 +29,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\[\s+\.yes\.\s+\]\s+\[\s+\.yes\.\s+\]\s+
+\[\s*\.yes\.\s*\]\s*\[\s*\.yes\.\s*\]\s*
@@ -28,4 +28,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\[\s+\.yes\.\s+\.yes\.\s+\]\s+\[\s+\.yes\.\s+\.\|value\|\.\s+\]\s+
+\[\s*\.yes\.\s*\.yes\.\s*\]\s*\[\s*\.yes\.\s*\.\|value\|\.\s*\]\s*
@@ -40,4 +40,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\[\s+I\s+got\s+interpolated\.\s+\|data\|\s+\{\{data\}\}\s+I\s+got\s+interpolated\.\s+\]\s+
+\[\s*I\s*got\s*interpolated\.\s*\|data\|\s*\{\{data\}\}\s*I\s*got\s*interpolated\.\s*\]\s*
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\(It\s+worked\!\)
+\(It\s*worked\!\)
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\|
+\|\s*\|
@@ -24,4 +24,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Begin\.\s+End\.\s+
+Begin\.\s*End\.\s*
@@ -21,4 +21,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\=\s+
+\=\s*
@@ -19,4 +19,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\|
+\|\s*\|
@@ -19,4 +19,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-I\s+\(\)\s+be\s+seen\!
+I\s*\(\)\s*be\s*seen\!
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"1\.21\s+jiggawatts\!"
+"1\.21\s*jiggawatts\!"
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"85\s+miles\s+an\s+hour\!"
+"85\s*miles\s*an\s*hour\!"
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\s+\-\-\-\s+
+\s*\-\-\-\s*
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\-\-\-\s+\|
+\|\s*\-\-\-\s*\|
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-These\s+characters\s+should\s+not\s+be\s+HTML\s+escaped\:\s+&\s+"\s+\<\s+\>\s+
+These\s*characters\s*should\s*not\s*be\s*HTML\s*escaped\:\s*&\s*"\s*\<\s*\>\s*
@@ -19,4 +19,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-I\s+\(\)\s+be\s+seen\!
+I\s*\(\)\s*be\s*seen\!
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"1\.21\s+jiggawatts\!"
+"1\.21\s*jiggawatts\!"
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"85\s+miles\s+an\s+hour\!"
+"85\s*miles\s*an\s*hour\!"
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Hello,\s+world\!\s+
+Hello,\s*world\!\s*
@@ -23,4 +23,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"Joe"\s+\=\=\s+"Joe"
+"Joe"\s*\=\=\s*"Joe"
@@ -35,4 +35,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"Phil"\s+\=\=\s+"Phil"
+"Phil"\s*\=\=\s*"Phil"
@@ -23,4 +23,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"Joe"\s+\=\=\s+"Joe"
+"Joe"\s*\=\=\s*"Joe"
@@ -29,4 +29,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-""\s+\=\=\s+""
+""\s*\=\=\s*""
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-""\s+\=\=\s+""
+""\s*\=\=\s*""
@@ -48,4 +48,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"Phil"\s+\=\=\s+"Phil"
+"Phil"\s*\=\=\s*"Phil"
@@ -23,4 +23,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"Joe"\s+\=\=\s+"Joe"
+"Joe"\s*\=\=\s*"Joe"
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-These\s+characters\s+should\s+be\s+HTML\s+escaped\:\s+&amp;\s+&quot;\s+&lt;\s+&gt;\s+
+These\s*characters\s*should\s*be\s*HTML\s*escaped\:\s*&amp;\s*&quot;\s*&lt;\s*&gt;\s*
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\s+\-\-\-\s+
+\s*\-\-\-\s*
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\-\-\-\s+\|
+\|\s*\-\-\-\s*\|
@@ -21,4 +21,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-Hello\s+from\s+\{Mustache\}\!\s+
+Hello\s*from\s*\{Mustache\}\!\s*
@@ -19,4 +19,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-I\s+\(\)\s+be\s+seen\!
+I\s*\(\)\s*be\s*seen\!
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"1\.21\s+jiggawatts\!"
+"1\.21\s*jiggawatts\!"
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-"85\s+miles\s+an\s+hour\!"
+"85\s*miles\s*an\s*hour\!"
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\s+\-\-\-\s+
+\s*\-\-\-\s*
@@ -20,4 +20,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-\|\s+\-\-\-\s+\|
+\|\s*\-\-\-\s*\|
@@ -22,4 +22,4 @@ $mustache = new Mustache();
echo $mustache->render($test["template"], $test["data"]);
?>
--EXPECTREGEX--
-These\s+characters\s+should\s+not\s+be\s+HTML\s+escaped\:\s+&\s+"\s+\<\s+\>\s+
+These\s*characters\s*should\s*not\s*be\s*HTML\s*escaped\:\s*&\s*"\s*\<\s*\>\s*
Oops, something went wrong.

0 comments on commit d930505

Please sign in to comment.