From b9612388e05a3885b5b92a3a0e8ad127c04e8630 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Wed, 30 Jun 2021 12:23:18 +1000 Subject: include units even when was unable to parse as prefix number postfix --- test/unitsToRanges.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/unitsToRanges.js') diff --git a/test/unitsToRanges.js b/test/unitsToRanges.js index 0908b1e..ccb583b 100644 --- a/test/unitsToRanges.js +++ b/test/unitsToRanges.js @@ -99,6 +99,12 @@ test('units list to addr:flats', t => { 'source duplicates removed with range' ) + t.same( + unitsToRanges(['1', 'G0 1', '2', '3']), + '1-3;G0 1', + 'some units unable to parse as prefix number postfix should still be listed' + ) + t.same( unitsToRanges('2,15,3,12,1,9,19,1C,1A,6,14,16,5,5-6,A,B,C,4,17-18,7-8'.split(',')), '1-9;12;14-19;1A;1C;A;B;C', -- cgit v1.2.3