Skip to content

Commit 13a3431

Browse files
committed
Sync with long_names_001.phpt
1 parent c1c62f5 commit 13a3431

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

β€Žtests/long_names_002.phptβ€Ž

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ function test_table(string $table){
1919
$c = 0;
2020

2121
$fields = [
22-
'"'.str_repeat("F", $MAX_LEN).'"',
23-
'"'.str_repeat("πŸ₯°", intdiv($MAX_LEN, 4)).'ppp"', // 7*(utf 4 bytes)+3 padding
22+
str_repeat("F", $MAX_LEN),
23+
str_repeat("πŸ₯°", intdiv($MAX_LEN, 4)).'ppp', // 7*(utf 4 bytes)+3 padding
2424
];
25-
$fields_str = join(" INTEGER, ", $fields)." INTEGER";
26-
$create_sql = sprintf('CREATE TABLE "%s" (%s)', $table, $fields_str);
25+
$fields_str = join('" INTEGER,"', $fields);
26+
$create_sql = sprintf('CREATE TABLE "%s" ("%s" INTEGER)', $table, $fields_str);
2727

2828
if(ibase_query($create_sql)){
2929
ibase_commit();
@@ -41,12 +41,23 @@ function test_table(string $table){
4141
(function(){
4242
global $MAX_LEN;
4343

44+
var_dump($MAX_LEN);
45+
4446
test_table(str_repeat('T', $MAX_LEN));
47+
test_table(str_repeat('πŸ˜‚', intdiv($MAX_LEN, 4)));
4548
})();
4649

4750
?>
4851
--EXPECT--
52+
int(31)
4953
Table:TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
54+
array(2) {
55+
["FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]=>
56+
int(1)
57+
["πŸ₯°πŸ₯°πŸ₯°πŸ₯°πŸ₯°πŸ₯°πŸ₯°ppp"]=>
58+
int(2)
59+
}
60+
Table:πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚
5061
array(2) {
5162
["FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]=>
5263
int(1)

0 commit comments

Comments
Β (0)