@@ -8,22 +8,22 @@ var wcwidth = require('../')
88var  test  =  require ( 'tape' ) 
99
1010
11- test ( 'handles regular strings' ,  function ( t )  { 
11+ test ( 'handles regular strings' ,  function   ( t )  { 
1212    t . strictEqual ( wcwidth ( 'abc' ) ,  3 ) 
1313    t . end ( ) 
1414} ) 
1515
16- test ( 'handles wide strings' ,  function ( t )  { 
16+ test ( 'handles wide strings' ,  function   ( t )  { 
1717    t . strictEqual ( wcwidth ( '한글字的模块テスト' ) ,  18 ) 
1818    t . end ( ) 
1919} ) 
2020
21- test ( 'handles wide characters mixed with regular characters' ,  function ( t )  { 
21+ test ( 'handles wide characters mixed with regular characters' ,  function   ( t )  { 
2222    t . strictEqual ( wcwidth ( 'abc 한글字的模块テスト' ) ,  22 ) 
2323    t . end ( ) 
2424} ) 
2525
26- test ( 'handles Hangul Jamos' ,  function ( t )  { 
26+ test ( 'handles Hangul Jamos' ,  function   ( t )  { 
2727    t . strictEqual ( wcwidth ( '\u1100\u1175' ) ,  2 )           // 가 
2828    t . strictEqual ( wcwidth ( '\u1112\u1161\u11ab' ) ,  2 )     // 한 
2929    t . strictEqual ( wcwidth ( '\u1100\u1160\u11ab' ) ,  2 )     // JUNGSEONG FILLER 
@@ -39,26 +39,26 @@ test('handles Hangul Jamos', function(t) {
3939    t . end ( ) 
4040} ) 
4141
42- test ( 'handle surrogate pairs' ,  function ( t )  { 
42+ test ( 'handle surrogate pairs' ,  function   ( t )  { 
4343    t . strictEqual ( wcwidth ( '\ud835\udca5\ud835\udcc8' ) ,  2 ) 
4444    t . strictEqual ( wcwidth ( '𝒥𝒶𝓋𝒶𝓈𝒸𝓇𝒾𝓅𝓉' ) ,  10 ) 
4545    t . strictEqual ( wcwidth ( '\ud840\udc34\ud840\udd58' ) ,  4 ) 
4646    t . end ( ) 
4747} ) 
4848
49- test ( 'invalid sequences with surrogate high/low values' ,  function ( t )  { 
49+ test ( 'invalid sequences with surrogate high/low values' ,  function   ( t )  { 
5050    t . strictEqual ( wcwidth ( '\ud835\u0065' ) ,  2 ) 
5151    t . strictEqual ( wcwidth ( '\u0065\udcc8' ) ,  2 ) 
5252    t . strictEqual ( wcwidth ( 'a\ud835\u0065\u0065\udcc8z' ) ,  6 ) 
5353    t . end ( ) 
5454} ) 
5555
56- test ( 'ignores control characters e.g. \\n' ,  function ( t )  { 
56+ test ( 'ignores control characters e.g. \\n' ,  function   ( t )  { 
5757    t . strictEqual ( wcwidth ( 'abc\t한글字的模块テスト\ndef' ) ,  24 ) 
5858    t . end ( ) 
5959} ) 
6060
61- test ( 'ignores bad input' ,  function ( t )  { 
61+ test ( 'ignores bad input' ,  function   ( t )  { 
6262    t . strictEqual ( wcwidth ( '' ) ,  0 ) 
6363    t . strictEqual ( wcwidth ( 3 ) ,  0 ) 
6464    t . strictEqual ( wcwidth ( { } ) ,  0 ) 
@@ -67,19 +67,19 @@ test('ignores bad input', function(t) {
6767    t . end ( ) 
6868} ) 
6969
70- test ( 'ignores NUL' ,  function ( t )  { 
70+ test ( 'ignores NUL' ,  function   ( t )  { 
7171    t . strictEqual ( wcwidth ( String . fromCharCode ( 0 ) ) ,  0 ) 
7272    t . strictEqual ( wcwidth ( '\0' ) ,  0 ) 
7373    t . end ( ) 
7474} ) 
7575
76- test ( 'ignores NUL mixed with chars' ,  function ( t )  { 
76+ test ( 'ignores NUL mixed with chars' ,  function   ( t )  { 
7777    t . strictEqual ( wcwidth ( 'a'  +  String . fromCharCode ( 0 )  +  '\n字的' ) ,  5 ) 
7878    t . strictEqual ( wcwidth ( 'a\0\n한글' ) ,  5 ) 
7979    t . end ( ) 
8080} ) 
8181
82- test ( 'can have custom value for NUL' ,  function ( t )  { 
82+ test ( 'can have custom value for NUL' ,  function   ( t )  { 
8383    t . strictEqual ( wcwidth . config ( { 
8484        nul : 10 
8585    } ) ( String . fromCharCode ( 0 )  +  'a字的' ) ,  15 ) 
@@ -89,21 +89,21 @@ test('can have custom value for NUL', function(t) {
8989    t . end ( ) 
9090} ) 
9191
92- test ( 'can have custom control char value' ,  function ( t )  { 
92+ test ( 'can have custom control char value' ,  function   ( t )  { 
9393    t . strictEqual ( wcwidth . config ( { 
9494        control : 1 
9595    } ) ( 'abc\n한글字的模块テスト\ndef' ) ,  26 ) 
9696    t . end ( ) 
9797} ) 
9898
99- test ( 'negative custom control chars == -1' ,  function ( t )  { 
99+ test ( 'negative custom control chars == -1' ,  function   ( t )  { 
100100    t . strictEqual ( wcwidth . config ( { 
101101        control : - 1 
102102    } ) ( 'abc\n한글字的模块テスト\ndef' ) ,  - 1 ) 
103103    t . end ( ) 
104104} ) 
105105
106- test ( 'negative custom value for NUL == -1' ,  function ( t )  { 
106+ test ( 'negative custom value for NUL == -1' ,  function   ( t )  { 
107107    t . strictEqual ( wcwidth . config ( { 
108108        nul : - 1 
109109    } ) ( 'abc\n한글字的模块テスト\0def' ) ,  - 1 ) 
0 commit comments