This test originally by Egmont Koblinger. Copied with permission, per https://gitlab.com/gnachman/iterm2/issues/5158#note_25843049

[1mTests for ]8;;https://bugzilla.gnome.org/show_bug.cgi?id=779734gnome-terminal #779734]8;; and ]8;;https://gitlab.com/gnachman/iterm2/issues/5158iTerm2 #5158]8;;[m
═════════════════════════════════════════════════

[33mcommit ]8;;https://git.gnome.org/browse/vte/commit/?id=a9b0b4c75a6dc7282f7cfcaef71413d69f7f0731a9b0b4c75a6dc7282f7cfcaef71413d69f7f0731]8;;[m
Author: Egmont Koblinger <]8;;mailto:egmont@gmail.comegmont@gmail.com]8;;>
Date:   Sat Oct 24 00:12:22 2015 +0200

    widget: Implement smooth scrolling
    
    ]8;;https://bugzilla.gnome.org/show_bug.cgi?id=746690Bug #746690]8;;

[33mcommit ]8;;https://git.gnome.org/browse/vte/commit/?id=6a74baeaabb0a1ce54444611b324338f94721a5c6a74baeaabb0a1ce54444611b324338f94721a5c]8;;[m
Merge: ]8;;https://git.gnome.org/browse/vte/commit/?id=3fac4463fac446]8;; ]8;;https://git.gnome.org/browse/vte/commit/?id=56ea58156ea581]8;;
Author: Christian Persch <]8;;mailto:chpe@gnome.orgchpe@gnome.org]8;;>
Date:   Mon Apr 27 13:48:52 2015 +0200

    Merge branch 'work-html' into merge-html

]8;;file:///var/lib/gconf/defaults/%25gconf-tree.xmlA file with a % sign in its name (escaped as %25)]8;;

]8;;https://en.wikipedia.org/wiki/ÁWiki page of Á (unescaped raw UTF-8)]8;;
]8;;https://en.wikipedia.org/wiki/%C3%81Wiki page of Á (escaped as %C3%81)]8;;
]8;;https://en.wikipedia.org/wiki/%25Wiki page of % (escaped as %25)]8;;

Two adjacent links pointing to the same URL:   ]8;;http://example.com/foofoo]8;;]8;;http://example.com/foofoo]8;;
Two adjacent links pointing to different URLs: ]8;;http://example.com/foofoo]8;;]8;;http://example.com/barbar]8;;

The same two without closing the first link: ]8;;http://example.com/foofoo]8;;http://example.com/foofoo]8;; ]8;;http://example.com/foofoo]8;;http://example.com/barbar]8;;

A URL wrapping to the next line, and a trailing whitespace: ]8;;http://example.com/foobarfoo
bar ]8;;

]8;;http://example.com/colors[31mM[32mu[33ml[34mt[35mi[36m-[0;48;;5;21mc[0;48;;5;27mo[0;48;;5;33ml[0;48;;5;39mo[0;48;;5;45mu[0;48;;5;51mr[m [1ml[0;3mi[0;4mn[0;9mk[m also tests that "\e[m" or "\e[0m" does [3mnot[0m terminate the link]8;;

Soft reset "\e[!p" resets attributes and terminates link: ]8;;http://example.com/softreset[3;31mfoo[!pbar

(Introducing the "under_score" character for even more fun)

Explicit and implicit link: ]8;;http://example.com/under_scorehttp://example.com/under_score]8;;
Explicit and implicit link with different targets: ]8;;http://example.com/explicit_under_scorehttp://example.com/implicit_under_score]8;;
Explicit and implicit link, broken into two lines: ]8;;http://example.com/under_scorehttp://examp
le.com/under_score]8;;

[4mExplicitly underlined links ("\e[4m"):[m
Explicit link only: [4m]8;;http://example.com/under_scoreI'm an explicit link with under_score]8;;[m
Implicit link only: [4mhttp://example.com/under_score[m
Both:               [4m]8;;http://example.com/under_scorehttp://example.com/under_score]8;;[m

Conflicting explicit and implicit links: http://example.com/foobar-]8;;http://example.com/explicitexplicit]8;;-rest

Invisible explicit and implicit link: [8m]8;;http://example.com/invisibleCan you see me?]8;; http://example.com/and_how_about_me[m

]8;;asdfghjklExplicit link with stupid target]8;;

]8;;http://example.com/.........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.....URL of 255 chars]8;;
]8;;http://example.com/.........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250......URL of 256 chars]8;;
]8;;http://example.com/.........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310.......320.......330.......340.......350.......360.......370.......380.......390.......400.......410.......420.......430.......440.......450.......460.......470.......480.......490.......500.......510.......520.......530.......540.......550.......560.......570.......580.......590.......600.......610.......620.......630.......640.......650.......660.......670.......680.......690.......700.......710.......720.......730.......740.......750.......760.......770.......780.......790.......800.......810.......820.......830.......840.......850.......860.......870.......880.......890.......900.......910.......920.......930.......940.......950.......960.......970.......980.......990......1000......1010......1020......1030......1040......1050......1060......1070......1080......1090......1100......1110......1120......1130......1140......1150......1160......1170......1180......1190......1200......1210......1220......1230......1240......1250......1260......1270......1280......1290......1300......1310......1320......1330......1340......1350......1360......1370......1380......1390......1400......1410......1420......1430......1440......1450......1460......1470......1480......1490......1500......1510......1520......1530......1540......1550......1560......1570......1580......1590......1600......1610......1620......1630......1640......1650......1660......1670......1680......1690......1700......1710......1720......1730......1740......1750......1760......1770......1780......1790......1800......1810......1820......1830......1840......1850......1860......1870......1880......1890......1900......1910......1920......1930......1940......1950......1960......1970......1980......1990......2000......2010......2020......2030......2040......2050......2060......2070......2080...URL of 2083 chars]8;;
]8;;http://example.com/.........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310.......320.......330.......340.......350.......360.......370.......380.......390.......400.......410.......420.......430.......440.......450.......460.......470.......480.......490.......500.......510.......520.......530.......540.......550.......560.......570.......580.......590.......600.......610.......620.......630.......640.......650.......660.......670.......680.......690.......700.......710.......720.......730.......740.......750.......760.......770.......780.......790.......800.......810.......820.......830.......840.......850.......860.......870.......880.......890.......900.......910.......920.......930.......940.......950.......960.......970.......980.......990......1000......1010......1020......1030......1040......1050......1060......1070......1080......1090......1100......1110......1120......1130......1140......1150......1160......1170......1180......1190......1200......1210......1220......1230......1240......1250......1260......1270......1280......1290......1300......1310......1320......1330......1340......1350......1360......1370......1380......1390......1400......1410......1420......1430......1440......1450......1460......1470......1480......1490......1500......1510......1520......1530......1540......1550......1560......1570......1580......1590......1600......1610......1620......1630......1640......1650......1660......1670......1680......1690......1700......1710......1720......1730......1740......1750......1760......1770......1780......1790......1800......1810......1820......1830......1840......1850......1860......1870......1880......1890......1900......1910......1920......1930......1940......1950......1960......1970......1980......1990......2000......2010......2020......2030......2040......2050......2060......2070......2080....URL of 2084 chars]8;;


The following three links have the same target. The first two should highlight together.
]8;id=id1;http://example.com/<Some text with id=id1>]8;;]8;id=id1;http://example.com/]8;id=id1;http://example.com/<More text with id=id1>]8;;]8;id=id2;http://example.com/<Some text with id=id2>]8;;

The following links have the same target, same ID, but different spam parameters. spam is not defined. They should all hover as one.
]8;spam=id1;http://example.com/<Some text with spam=id1>]8;;]8;spam=id2;http://example.com/<Some text with spam=id2>]8;;]8;spam=id3;http://example.com/<Some text with spam=id3>]8;;

These links have both an undefined spam parameter and an id. They should hover separately.
]8;spam=1:id=1;http://example.com/<Some text with spam=1;id=1>]8;;]8;spam=1:id=2;http://example.com/<More text with spam=1;id=2>]8;;]8;spam=1:id=3;http://example.com/<Some text with spam=1;id=3>]8;;
