Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1063)

Unified Diff: pkg/mustache/test/spec/comments.yml

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/mustache/test/spec/comments.json ('k') | pkg/mustache/test/spec/delimiters.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mustache/test/spec/comments.yml
diff --git a/pkg/mustache/test/spec/comments.yml b/pkg/mustache/test/spec/comments.yml
new file mode 100644
index 0000000000000000000000000000000000000000..7b14c7f3278d7a306b94117a8bcabcc780f1cd58
--- /dev/null
+++ b/pkg/mustache/test/spec/comments.yml
@@ -0,0 +1,103 @@
+overview: |
+ Comment tags represent content that should never appear in the resulting
+ output.
+
+ The tag's content may contain any substring (including newlines) EXCEPT the
+ closing delimiter.
+
+ Comment tags SHOULD be treated as standalone when appropriate.
+tests:
+ - name: Inline
+ desc: Comment blocks should be removed from the template.
+ data: { }
+ template: '12345{{! Comment Block! }}67890'
+ expected: '1234567890'
+
+ - name: Multiline
+ desc: Multiline comments should be permitted.
+ data: { }
+ template: |
+ 12345{{!
+ This is a
+ multi-line comment...
+ }}67890
+ expected: |
+ 1234567890
+
+ - name: Standalone
+ desc: All standalone comment lines should be removed.
+ data: { }
+ template: |
+ Begin.
+ {{! Comment Block! }}
+ End.
+ expected: |
+ Begin.
+ End.
+
+ - name: Indented Standalone
+ desc: All standalone comment lines should be removed.
+ data: { }
+ template: |
+ Begin.
+ {{! Indented Comment Block! }}
+ End.
+ expected: |
+ Begin.
+ End.
+
+ - name: Standalone Line Endings
+ desc: '"\r\n" should be considered a newline for standalone tags.'
+ data: { }
+ template: "|\r\n{{! Standalone Comment }}\r\n|"
+ expected: "|\r\n|"
+
+ - name: Standalone Without Previous Line
+ desc: Standalone tags should not require a newline to precede them.
+ data: { }
+ template: " {{! I'm Still Standalone }}\n!"
+ expected: "!"
+
+ - name: Standalone Without Newline
+ desc: Standalone tags should not require a newline to follow them.
+ data: { }
+ template: "!\n {{! I'm Still Standalone }}"
+ expected: "!\n"
+
+ - name: Multiline Standalone
+ desc: All standalone comment lines should be removed.
+ data: { }
+ template: |
+ Begin.
+ {{!
+ Something's going on here...
+ }}
+ End.
+ expected: |
+ Begin.
+ End.
+
+ - name: Indented Multiline Standalone
+ desc: All standalone comment lines should be removed.
+ data: { }
+ template: |
+ Begin.
+ {{!
+ Something's going on here...
+ }}
+ End.
+ expected: |
+ Begin.
+ End.
+
+ - name: Indented Inline
+ desc: Inline comments should not strip whitespace
+ data: { }
+ template: " 12 {{! 34 }}\n"
+ expected: " 12 \n"
+
+ - name: Surrounding Whitespace
+ desc: Comment removal should preserve surrounding whitespace.
+ data: { }
+ template: '12345 {{! Comment Block! }} 67890'
+ expected: '12345 67890'
« no previous file with comments | « pkg/mustache/test/spec/comments.json ('k') | pkg/mustache/test/spec/delimiters.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698