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

Unified Diff: lib/src/prism/tests/languages/elixir/string_feature.test

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months 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
Index: lib/src/prism/tests/languages/elixir/string_feature.test
diff --git a/lib/src/prism/tests/languages/elixir/string_feature.test b/lib/src/prism/tests/languages/elixir/string_feature.test
new file mode 100644
index 0000000000000000000000000000000000000000..ca54f4be820506fe1e3a0a3b4ceebe0ad638592c
--- /dev/null
+++ b/lib/src/prism/tests/languages/elixir/string_feature.test
@@ -0,0 +1,115 @@
+~s/foobar/
+~s/foo#{42}bar/
+~S|foobar|
+~c"foobar"
+~c"foo#{42}bar"
+~C'foobar'
+~w(foobar)c
+~w(foo#{42}bar)s
+~W[foobar]a
+~s{foobar}
+~s{foo#{42}bar}
+~S<foobar>
+
+"""
+Foo bar
+"""
+
+'''
+Foo bar
+'''
+
+~S"""
+Foo bar
+"""
+
+~c"""
+Foo bar
+"""
+
+~w"""
+Foo bar
+"""
+
+""
+"foo"
+"fo\"o\
+#{42}bar"
+''
+'foo'
+'fo\'o\
+bar'
+
+----------------------------------------------------
+
+[
+ ["string", ["~s/foobar/"]],
+ ["string", [
+ "~s/foo",
+ ["interpolation", [
+ ["delimiter", "#{"],
+ ["number", "42"],
+ ["delimiter", "}"]
+ ]],
+ "bar/"
+ ]],
+ ["string", ["~S|foobar|"]],
+ ["string", ["~c\"foobar\""]],
+ ["string", [
+ "~c\"foo",
+ ["interpolation", [
+ ["delimiter", "#{"],
+ ["number", "42"],
+ ["delimiter", "}"]
+ ]],
+ "bar\""
+ ]],
+ ["string", ["~C'foobar'"]],
+ ["string", ["~w(foobar)c"]],
+ ["string", [
+ "~w(foo",
+ ["interpolation", [
+ ["delimiter", "#{"],
+ ["number", "42"],
+ ["delimiter", "}"]
+ ]],
+ "bar)s"
+ ]],
+ ["string", ["~W[foobar]a"]],
+ ["string", ["~s{foobar}"]],
+ ["string", [
+ "~s{foo",
+ ["interpolation", [
+ ["delimiter", "#{"],
+ ["number", "42"],
+ ["delimiter", "}"]
+ ]],
+ "bar}"
+ ]],
+ ["string", ["~S<foobar>"]],
+
+ ["string", ["\"\"\"\r\nFoo bar\r\n\"\"\""]],
+ ["string", ["'''\r\nFoo bar\r\n'''"]],
+ ["string", ["~S\"\"\"\r\nFoo bar\r\n\"\"\""]],
+ ["string", ["~c\"\"\"\r\nFoo bar\r\n\"\"\""]],
+ ["string", ["~w\"\"\"\r\nFoo bar\r\n\"\"\""]],
+
+ ["string", ["\"\""]],
+ ["string", ["\"foo\""]],
+ ["string", [
+ "\"fo\\\"o\\\r\n",
+ ["interpolation", [
+ ["delimiter", "#{"],
+ ["number", "42"],
+ ["delimiter", "}"]
+ ]],
+ "bar\""
+ ]],
+ ["string", ["''"]],
+ ["string", ["'foo'"]],
+ ["string", ["'fo\\'o\\\r\nbar'"]]
+]
+
+----------------------------------------------------
+
+Checks for strings.
« no previous file with comments | « lib/src/prism/tests/languages/elixir/regex_feature.test ('k') | lib/src/prism/tests/languages/erlang/atom_feature.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698