OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 3529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3540 sqlite3_mprintf_str {%d %d A quoted string: '%.0q'} 1 2 {Hi Y'all} | 3540 sqlite3_mprintf_str {%d %d A quoted string: '%.0q'} 1 2 {Hi Y'all} |
3541 } {1 2 A quoted string: ''} | 3541 } {1 2 A quoted string: ''} |
3542 do_test printf-4.16 { | 3542 do_test printf-4.16 { |
3543 sqlite3_mprintf_str {%d A quoted string: '%.*q'} 1 6 {Hi Y'all} | 3543 sqlite3_mprintf_str {%d A quoted string: '%.*q'} 1 6 {Hi Y'all} |
3544 } {1 A quoted string: 'Hi Y''a'} | 3544 } {1 A quoted string: 'Hi Y''a'} |
3545 | 3545 |
3546 | 3546 |
3547 do_test printf-5.1 { | 3547 do_test printf-5.1 { |
3548 set x [sqlite3_mprintf_str {%d %d %100000s} 0 0 {Hello}] | 3548 set x [sqlite3_mprintf_str {%d %d %100000s} 0 0 {Hello}] |
3549 string length $x | 3549 string length $x |
3550 } {344} | 3550 } {100004} |
3551 do_test printf-5.2 { | 3551 do_test printf-5.2 { |
3552 sqlite3_mprintf_str {%d %d (%-10.10s) %} -9 -10 {HelloHelloHello} | 3552 sqlite3_mprintf_str {%d %d (%-10.10s) %} -9 -10 {HelloHelloHello} |
3553 } {-9 -10 (HelloHello) %} | 3553 } {-9 -10 (HelloHello) %} |
3554 | 3554 |
3555 do_test printf-6.1 { | 3555 do_test printf-6.1 { |
3556 sqlite3_mprintf_z_test , one two three four five six | 3556 sqlite3_mprintf_z_test , one two three four five six |
3557 } {,one,two,three,four,five,six} | 3557 } {,one,two,three,four,five,six} |
3558 | 3558 |
3559 | 3559 |
3560 do_test printf-7.1 { | 3560 do_test printf-7.1 { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3746 do_test printf-malloc-$::iRepeat.$nTestNum { | 3746 do_test printf-malloc-$::iRepeat.$nTestNum { |
3747 expr {($nFail>0 && $z eq "") || ($nFail==$nBenign && $z eq $zSuccess)} | 3747 expr {($nFail>0 && $z eq "") || ($nFail==$nBenign && $z eq $zSuccess)} |
3748 } {1} | 3748 } {1} |
3749 if {$nFail == 0} break | 3749 if {$nFail == 0} break |
3750 incr nTestNum | 3750 incr nTestNum |
3751 } | 3751 } |
3752 } | 3752 } |
3753 } | 3753 } |
3754 | 3754 |
3755 finish_test | 3755 finish_test |
OLD | NEW |