| 455 | // WP Ticket #19308 |
| 456 | // Hex numbers of 0x1234 format should not be texturized as a "x [times] y" equation |
| 457 | function test_hex_numbers() { |
| 458 | $this->knownWPBug(19308); |
| 459 | |
| 460 | // Hex numbers - these should display without a mathematical multiplaction sign |
| 461 | $this->assertEquals('0x70', wptexturize('0x70')); |
| 462 | $this->assertEquals('-0x70', wptexturize('-0x70')); |
| 463 | $this->assertEquals('0xABCDEF00', wptexturize('0xABCDEF00')); |
| 464 | $this->assertEquals('-0xABCDEF00', wptexturize('-0xABCDEF00')); |
| 465 | $this->assertEquals('0x3366ff', wptexturize('0x3366ff')); |
| 466 | |
| 467 | // Nonsense pattern, shouldn't be touched |
| 468 | $this->assertEquals('0x1x2x3', wptexturize('0x1x2x3')); |
| 469 | |
| 470 | // Simple equations with a comma and negative operands |
| 471 | $this->assertEquals('-123×1=-123', wptexturize('-123x1=-123')); |
| 472 | $this->assertEquals('0.675×1=0.675', wptexturize('0.675x1=0.675')); |
| 473 | } |
| 474 | |