summaryrefslogtreecommitdiff
path: root/test/text_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2012-12-11 02:04:54 -0700
committerDan Allen <dan.j.allen@gmail.com>2012-12-11 02:04:54 -0700
commit1ddb79e3b3463d5ed8a6cf13717df0d9764808d3 (patch)
tree0651b6af8c9fd27cb9d5f0a96ca210d7c1ed2928 /test/text_test.rb
parent2030da2ca07eb4cfe5d96053298d5bdc96eb1a0c (diff)
allow quoted text to be at start or end of line
Diffstat (limited to 'test/text_test.rb')
-rw-r--r--test/text_test.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/text_test.rb b/test/text_test.rb
index efddb03d..579fedea 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -23,6 +23,22 @@ context "Text" do
assert_xpath "//em", render_string("An 'emphatic' no")
end
+ test "emphasized text with escaped single quote" do
+ assert_xpath "//em[text()=\"Johnny's\"]", render_string("It's 'Johnny\'s' phone")
+ end
+
+ test "emphasized text at end of line" do
+ assert_xpath "//em", render_string("This library is 'awesome'")
+ end
+
+ test "emphasized text at beginning of line" do
+ assert_xpath "//em", render_string("'drop' it")
+ end
+
+ test "emphasized text across line" do
+ assert_xpath "//em", render_string("'check it'")
+ end
+
test "unquoted text" do
assert_no_match /#/, render_string("An #unquoted# word")
end
@@ -74,4 +90,4 @@ context "Text" do
assert_xpath "//tt", rendered_chars
end
end
-end \ No newline at end of file
+end