test/text_test.rb in asciidoctor-0.0.4 vs test/text_test.rb in asciidoctor-0.0.5
- old
+ new
@@ -14,17 +14,37 @@
assert_match /“Where\?,”/, rendered
assert_match /‘The New Yorker.’/, rendered
end
test "separator" do
- assert_xpath "//hr", render_string("This is separated.\n\n''''\n\n...from this!"), 1
+ assert_xpath "//hr", render_string("This is separated.\n\n'''\n\n...from this!"), 1
end
test "emphasized 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 "escaped single quote is restore as single quote" do
+ assert_xpath "//p[contains(text(), \"Let's do it!\")]", render_string("Let\\'s do it!")
+ 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
test "backtick-escaped text followed by single-quoted text" do
@@ -72,6 +92,6 @@
assert_xpath "//strong", rendered_chars
assert_xpath "//em", rendered_chars
assert_xpath "//tt", rendered_chars
end
end
-end
\ No newline at end of file
+end