diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2012-12-11 02:04:54 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2012-12-11 02:04:54 -0700 |
| commit | 1ddb79e3b3463d5ed8a6cf13717df0d9764808d3 (patch) | |
| tree | 0651b6af8c9fd27cb9d5f0a96ca210d7c1ed2928 /test | |
| parent | 2030da2ca07eb4cfe5d96053298d5bdc96eb1a0c (diff) | |
allow quoted text to be at start or end of line
Diffstat (limited to 'test')
| -rw-r--r-- | test/text_test.rb | 18 |
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 |
