File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1374,3 +1374,23 @@ fn check_disallow_blank_in_set2_when_translating() {
1374
1374
fn check_class_in_set2_must_be_matched_in_set1 ( ) {
1375
1375
new_ucmd ! ( ) . args ( & [ "-t" , "1[:upper:]" , "[:upper:]" ] ) . fails ( ) ;
1376
1376
}
1377
+
1378
+ #[ test]
1379
+ fn check_complement_2_unique_in_set2 ( ) {
1380
+ let x226 = std:: iter:: repeat ( "x" ) . take ( 226 ) . collect :: < String > ( ) ;
1381
+
1382
+ // [y*] is expanded tp "y" here
1383
+ let arg = x226 + "[y*]xxx" ;
1384
+ new_ucmd ! ( ) . args ( & [ "-c" , "[:upper:]" , arg. as_str ( ) ] ) . fails ( ) ;
1385
+ }
1386
+
1387
+ #[ test]
1388
+ fn check_complement_1_unique_in_set2 ( ) {
1389
+ let x226 = std:: iter:: repeat ( "x" ) . take ( 226 ) . collect :: < String > ( ) ;
1390
+
1391
+ // [y*] is expanded to "" here
1392
+ let arg = x226 + "[y*]xxxx" ;
1393
+ new_ucmd ! ( )
1394
+ . args ( & [ "-c" , "[:upper:]" , arg. as_str ( ) ] )
1395
+ . succeeds ( ) ;
1396
+ }
You can’t perform that action at this time.
0 commit comments