File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -545,3 +545,40 @@ Feature: Ack through the database
545
545
"""
546
546
:11111111searchstring11111111
547
547
"""
548
+
549
+ Scenario : Multibyte strings are truncated
550
+ Given a WP install
551
+ And I run `wp option update multibytetest 'あいうえおかきくけこさしすせとたちつてと' `
552
+
553
+ When I run `wp db ack "かきくけこ" --before_context=0 --after_context=0`
554
+ Then STDOUT should contain:
555
+ """
556
+ :かきくけこ
557
+ """
558
+ And STDOUT should not contain:
559
+ """
560
+ かきくけこさ
561
+ """
562
+
563
+ When I run `wp db ack "かきくけこ" --before_context=3 --after_context=3`
564
+ Then STDOUT should contain:
565
+ """
566
+ :うえおかきくけこさしす
567
+ """
568
+
569
+
570
+ When I run `wp db ack "かきくけこ" --before_context=2 --after_context=1`
571
+ Then STDOUT should contain:
572
+ """
573
+ :えおかきくけこさし
574
+ """
575
+ And STDOUT should not contain:
576
+ """
577
+ えおかきくけこさしす
578
+ """
579
+
580
+ When I run `wp db ack "かきくけこ" `
581
+ Then STDOUT should contain:
582
+ """
583
+ :あいうえおかきくけこさしすせとたちつてと
584
+ """
You can’t perform that action at this time.
0 commit comments