diff options
| -rw-r--r-- | test/links_test.rb | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/test/links_test.rb b/test/links_test.rb index 8d8299dc..1c8fd4e4 100644 --- a/test/links_test.rb +++ b/test/links_test.rb @@ -193,16 +193,31 @@ context 'Links' do end test 'URI scheme with trailing characters should not be converted to a link' do - input_sources = %w( - (https://) + comma = ',' + input_sources = %W( + http://; + file://: + irc://#{comma} + ) + expected_outputs = %W( http://; file://: + irc://#{comma} + ) + input_sources.each_with_index do |input_source, i| + expected_output = expected_outputs[i] + actual = block_from_string input_source + assert_equal expected_output, actual.content + end + end + + test 'bare URI scheme enclosed in brackets should not be converted to link' do + input_sources = %w( + (https://) <ftp://> ) expected_outputs = %w( (https://) - http://; - file://: <ftp://> ) input_sources.each_with_index do |input_source, i| |
