File tree Expand file tree Collapse file tree 2 files changed +688
-155
lines changed Expand file tree Collapse file tree 2 files changed +688
-155
lines changed Original file line number Diff line number Diff line change @@ -563,3 +563,34 @@ fn tr_octal_parsing_non_ambiguous() {
563
563
"321 \\ \x53 \x50 \x02 \x01 \\ CB" ,
564
564
) ;
565
565
}
566
+
567
+ #[ test]
568
+ fn tr_equiv_class_and_other_deletions ( ) {
569
+ tr_test ( & [ "-d" , "4[=a=]2" ] , "1 3 A a 2 4" , "1 3 A " ) ;
570
+ }
571
+
572
+ #[ test]
573
+ fn tr_string2_equiv_inappropriate ( ) {
574
+ tr_bad_arguments_failure_test (
575
+ & [ "1" , "[=a=]" ] ,
576
+ "tr: [=c=] expressions may not appear in string2 when translating\n " ,
577
+ ) ;
578
+ }
579
+
580
+ #[ test]
581
+ fn tr_equivalence_class_low_priority ( ) {
582
+ const INPUT : & str = "aaa bbb ccc 123" ;
583
+ const OUTPUT : & str = "YYY bbb ccc 123" ;
584
+
585
+ tr_test ( & [ "[=a=]a" , "XY" ] , INPUT , OUTPUT ) ;
586
+
587
+ tr_test ( & [ "a[=a=]" , "XY" ] , INPUT , OUTPUT ) ;
588
+ }
589
+
590
+ #[ test]
591
+ fn tr_arguments_validation_error_message_format ( ) {
592
+ tr_bad_arguments_failure_test (
593
+ & [ "a" ] ,
594
+ "tr: missing operand after ‘a’. Two strings must be given when translating.\n " ,
595
+ ) ;
596
+ }
You can’t perform that action at this time.
0 commit comments