Ticket #19861: 19861-unit-test.patch

File 19861-unit-test.patch, 654 bytes (added by kurtpayne, 10 months ago)

Updated for lookbehind patch

  • tests/db.php

     
    7878                // Restore locale 
    7979                setlocale( LC_ALL, $current_locale ); 
    8080        } 
     81         
     82        /** 
     83         * Test that an escaped %%f is not altered 
     84         * @ticket 19861 
     85         */ 
     86        public function test_double_escaped_placeholders() { 
     87                global $wpdb; 
     88                $sql = $wpdb->prepare( "UPDATE test_table SET string_column = '%%f is a float and %%d is an int and %%s is a string'" ); 
     89                $this->assertEquals( "UPDATE test_table SET string_column = '%f is a float and %d is an int and %s is a string'", $sql ); 
     90        } 
    8191}