User:GregU/dashes.js/tests

General
One thing’s for sure—he doesn’t want to face the truth. One thing’s for sure – he doesn’t want to face the truth. One thing’s for sure – he doesn’t want to face the truth.

one-two - three -- four--five - six- seven -- eight -nine ten---eleven twelvethirteen }} ! Range ! Range:
 * p. 345-32 pp. 345-32
 * yes 4-11 yes 4-111 not 4-1111 not 35-335 yes 35-340 not 8-235 not 35-2006
 * minus signs: pp. 345−53, yes 4−11 yes 4−111 not 4−1111 not 35−335 yes 35−340 not 8−235 not 35−2006
 * not 11-4 yes (11-4) not 9-11 yes 9-11 km 9-11 GHz 9-11 no
 * not 11-4 yes (11-4) not 9-11 yes 9-11 km 9-11 GHz 9-11 no
 * not 03-07 not 3-07 yes 8:30-9:30 yes 82,500-90,000 not 82*500-90*000 not HRG.107-53. end
 * foo 5-8 table 5-8 fig. 5-8 STD 5-8 bar 5-8
 * W 24-21 L 16-7 PL 107-6 P.L. 107-6 Pub.L. 107-6 Pvt.L. 107-6 Public Law 107-6
 * overlapping: should do all 3-7 3-7 3-7 3-7 3-7 3-7 3-7
 * ISBN 960-425-059-0 ISMN 960-425-059-0 USMC 960-425-059-0
 * pp 7-12–13 ndash after –7-12 ndash before
 * 8-5 piggy 8-5 record 8-5 win
 * winning 8-5 and losing 8-5 and went 8-5 and 8-5 and led 8-5 and Going 8-5 and ended 8-5
 * yes 12-5 BC not 12-5 barney
 * pp. 8, 25, 270-74, 313-7, foo 270-74
 * ap. 8, 25, 270-74, 313-7, foo 270-74
 * rp template
 * 40%-50%, 1.5-3%, 40-50%, $40-$50, $40.25-$50.00, 8-5, 8-5, 88-55, 1119?-1150
 * 3½-5½, 7⅜%-9%
 * 2nd-3rd, 8-11th, 1st-4th, 1st-4sh, Fred 3-4th Bob
 * record of 105-25-3 or /105-25-3 or none
 * his 15–page and 8−year streak ended with a 4–foot slide
 * image= J S Copley - Samuel Adams.jpg
 * filename =ACDC - Back In Black-sample.ogg
 * image      = Chinua Achebe - Buffalo 25Sep2008 crop.jpg
 * image      = Chinua Achebe - Buffalo 25Sep2008 crop.jpg
 * USD $40,000-50,000
 * 45-50
 * 62-64
 * 45-50
 * 62-64
 * one 2-6  three 2-6 fred   six 2-6

[no] [yes, as unlikely to occur]


 * 1) "Can I Get Mine"- 3:04
 * 2) "Can I Get Mine"-3:04 (no spacing... leave as-is)
 * 3) "Janitor of Lunacy" — 14:02*
 * 4) "Intro"− :46
 * 5) "Wild and Untamed Thing" –4:20 (comment)

Negatives and arrows

 * it's -22 °F (-30 °C) outside
 * but not -22 °F outside
 * Tools -> Options -> Advanced
 * aaa<-bbb->ccc; aaa←bbb-->ccc
 * aaa<=bbb=>ccc; aaa←bbb→ccc
 * -35 °F looks like a table but knows to ignore
 * 5×10–8, beta -2

Dates
Fred Mercury (1825-1881) and his wife Ethel (1826-88) and daughter Mabel (1850-35) are all people.
 * Frank (1972-) and Bink (2143-) and lived 1872- quite well
 * (1973-present), 1973-Present
 * November 15, 2005-March 7, 2006
 * Donald Byrne (June 12, 1930–April 8, 1976)
 * October 18-November 4 and on May-June 2007
 * 1957-58
 * Retrieved on 2007-09-06.
 * (1952 - 1984) or (1952 – 1984) or (1952 − 1984) or happened 1952 - 1984 timeframe or (1952 - 1984)
 * 1903-1912, 1903-1912
 * State leaders by year like 266-283 and (29 BC-AD 70)
 * 1970s-1990s Revivals
 * Greg's Environmental Report 1987-1992; Greg's Environmental Report (1987-1992)

Regression

 * not http://www.cisalpino.com/go/151208-Timetable-change--customer-support-in-Lugano
 * not
 * not dashes in URL
 * yes http://www.cisalpino.com/go/151208 - change this one
 * DOI pmid=11543120 | doi=10.1111/j.1749-6632.1997.tb48351.x | foo=amy
 * SICI 1046-8188(199501)13:1<69:FTTHBI>2.0.TX;2-4
 * info:sici/1046-8188(199501)13:1%3C69:FTTHBI%3E2.0.TX;2-4
 * URN:SICI:1046-8188(199501)13:1%3C69:FTTHBI%3E2.0.TX;2-4
 * not

False positives

 * Korean Air Lines Flight 007 - Argued: April 5, 1995 Decided: July 12, 1995, Docket Nos. 94-7208, 94-7218
 * Zinc - non-bolded  and pp=12-11–12
 * United States ISAAA Brief 35-2006: Executive Summary (ok now, with the smarter range logic)
 * A = B - C in some math articles. Should be a minus sign, but an en dash is slightly better than a hyphen.

Interesting test pages

 * Mumia Abu-Jamal - no. vs nos., and .ogg template params
 * Chinua Achebe - image = .jpg
 * Drug cartel - 1970s-1980s
 * Life expectancy – Data evaluation and methods research ; no. 129 (DHHS publication ; no. (PHS) 99-1329)
 * Spanish Air Force Order of Battle - rare case that would need &lt;!--nodashes--&gt;
 * Dimenoxadol Farmakologiia i Toksikologiia. 1969 Nov-Dec;32(6):710-2.
 * Bricker Amendment - if (before==' ' && after ~ /^[,.] / && string ~ /\bvot/) || after = "vote"
 * United States v. Wong Kim Ark - in a 6-2 decision, they did... Category:Court
 * WikiProject Elements - (non-article) example where spaces should not be removed around em dashes