okami.mom/web-extract-go
git clone https://git.nkp.pet/okami.mom/web-extract-go
9352270
main
1package app 2 3import "testing" 4 5func TestCitationMarkersPointAtSources (t * testing.T ) { 6for in ,want := range map [string ]string { 7"ARC is separate [2:section-9][1:section-46]." :"ARC is separate [2][1]." , 8"see [source-1:section-2] and [1:section-3][1:section-4]" :"see [1] and [1]" , 9"kept [1][2], code a[0] and [link](https://x.org)" :"kept [1][2], code a[0] and [link](https://x.org)" , 10"repeat [3][3][1][3]" :"repeat [3][1]" , 11 } { 12if got := citationMarkers (in );got != want { 13t .Errorf ("%q: got %q want %q" ,in ,got ,want ) 14 } 15 } 16}