1 | /** |
---|
2 | * Do smart quotes break when surrounded by dashes? |
---|
3 | * |
---|
4 | * @ticket 20342 |
---|
5 | */ |
---|
6 | function test_dashes_around_quotes() { |
---|
7 | $input = array(); |
---|
8 | $output = array(); |
---|
9 | |
---|
10 | // These may fail in 3.8 |
---|
11 | |
---|
12 | $input[] = 'word---"quote"'; |
---|
13 | $output[] = 'word—“quote”'; |
---|
14 | |
---|
15 | $input[] = 'word--"quote"'; |
---|
16 | $output[] = 'word–“quote”'; |
---|
17 | |
---|
18 | $input[] = 'word-"quote"'; |
---|
19 | $output[] = 'word-“quote”'; |
---|
20 | |
---|
21 | // These should pass already |
---|
22 | |
---|
23 | $input[] = '"quote"---word'; |
---|
24 | $output[] = '“quote”—word'; |
---|
25 | |
---|
26 | $input[] = '"quote"--word'; |
---|
27 | $output[] = '“quote”–word'; |
---|
28 | |
---|
29 | $input[] = '"quote"-word'; |
---|
30 | $output[] = '“quote”-word'; |
---|
31 | |
---|
32 | foreach($input as $key => $in) { |
---|
33 | $this->assertEquals( $output[$key], wptexturize( $in ) ); |
---|
34 | } |
---|
35 | } |
---|