aboutsummaryrefslogtreecommitdiffstats
path: root/skate/url_test.go
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-06-10 01:48:45 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-06-10 01:48:45 +0200
commit2b88452ec73e0a34dedcfbcc515eb6a91ce7e3e6 (patch)
treeda06929afea84d372f7de8247536444945c666e8 /skate/url_test.go
parentb85f3cab82f1bcc757021daadfc65a68ce834f6d (diff)
downloadrefcat-2b88452ec73e0a34dedcfbcc515eb6a91ce7e3e6.tar.gz
refcat-2b88452ec73e0a34dedcfbcc515eb6a91ce7e3e6.zip
add test cases
Diffstat (limited to 'skate/url_test.go')
-rw-r--r--skate/url_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/skate/url_test.go b/skate/url_test.go
index 5e36cae..8103246 100644
--- a/skate/url_test.go
+++ b/skate/url_test.go
@@ -131,6 +131,14 @@ func TestSanitizeURL(t *testing.T) {
`http://hdl.handle.net/1765/1163`},
{`cdec.water.ca.gov/misc/DailyPrecip.html`,
`http://cdec.water.ca.gov/misc/DailyPrecip.html`},
+ {`https://www.ibge.gov.br/estatisticas/sociais/populacao/9103-estimativas-de-populacao.html?=&t=resultados.Accessed22`,
+ `https://www.ibge.gov.br/estatisticas/sociais/populacao/9103-estimativas-de-populacao.html?=&t=resultados`},
+ {`https://doi.org/10.1101/2020.06.23.167395doi:bioRxivpreprint`, // TODO: e.g. remove "doi:" or the like
+ `https://doi.org/10.1101/2020.06.23.167395doi:bioRxivpreprint`},
+ {`mail:claire.wyart@icm-institute.org,claire.wyart@inserm.frhttp://dx.doi.org/10.1016/j.cub.2015.01.006`,
+ `http://dx.doi.org/10.1016/j.cub.2015.01.006`},
+ {`http://www.nbcnews.com/technology/virtual-cockpit-what-it-takes-fly-drone-1C9319684.Acessoem:15/07/2013`,
+ `http://www.nbcnews.com/technology/virtual-cockpit-what-it-takes-fly-drone-1C9319684`},
}
for _, c := range cases {
out := SanitizeURL(c.in)