# This file is part of NIT ( http://www.nitlanguage.org ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module test_commonmark_autolinks is test import test_markdown class TestCommonmarkAutolinks super TestMarkdownHtml test fun test568 is test do var md = """\n""" var html = """

http://foo.bar.baz

\n""" assert md_to_html(md) == html end fun test569 is test do var md = """\n""" var html = """

http://foo.bar.baz/test?q=hello&id=22&boolean

\n""" assert md_to_html(md) == html end fun test570 is test do var md = """\n""" var html = """

irc://foo.bar:2233/baz

\n""" assert md_to_html(md) == html end fun test571 is test do var md = """\n""" var html = """

MAILTO:FOO@BAR.BAZ

\n""" assert md_to_html(md) == html end fun test572 is test do var md = """\n""" var html = """

a+b+c:d

\n""" assert md_to_html(md) == html end fun test573 is test do var md = """\n""" var html = """

made-up-scheme://foo,bar

\n""" assert md_to_html(md) == html end fun test574 is test do var md = """\n""" var html = """

http://../

\n""" assert md_to_html(md) == html end fun test575 is test do var md = """\n""" var html = """

localhost:5001/foo

\n""" assert md_to_html(md) == html end fun test576 is test do var md = """\n""" var html = """

<http://foo.bar/baz bim>

\n""" assert md_to_html(md) == html end fun test577 is test do var md = """\n""" var html = """

http://example.com/\\[\\

\n""" assert md_to_html(md) == html end fun test578 is test do var md = """\n""" var html = """

foo@bar.example.com

\n""" assert md_to_html(md) == html end fun test579 is test do var md = """\n""" var html = """

foo+special@Bar.baz-bar0.com

\n""" assert md_to_html(md) == html end fun test580 is test do var md = """\n""" var html = """

<foo+@bar.example.com>

\n""" assert md_to_html(md) == html end fun test581 is test do var md = """<>\n""" var html = """

<>

\n""" assert md_to_html(md) == html end fun test582 is test do var md = """< http://foo.bar >\n""" var html = """

< http://foo.bar >

\n""" assert md_to_html(md) == html end fun test583 is test do var md = """\n""" var html = """

<m:abc>

\n""" assert md_to_html(md) == html end fun test584 is test do var md = """\n""" var html = """

<foo.bar.baz>

\n""" assert md_to_html(md) == html end fun test585 is test do var md = """http://example.com\n""" var html = """

http://example.com

\n""" assert md_to_html(md) == html end fun test586 is test do var md = """foo@bar.example.com\n""" var html = """

foo@bar.example.com

\n""" assert md_to_html(md) == html end end