Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1149 → Rev 1150

/trunk/dev/test_database_plugins
320,32 → 320,6
echo "Transaction support: " . redtext('Not supported') ."\n";
}
 
// --- Check natOrder feature
 
$db->query("delete from ###objects where parent = 'test:1'");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('oid:3.1.10', 'test:1', '', '', '0')");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('oid:3.1.2', 'test:1', '', '', '0')");
$res = $db->query("select id from ###objects where parent = ? order by ".$db->natOrder('id'), array('test:1'));
//$res->num_rows(); // sponge
$val = $res->fetch_object()->id;
echo "Natural OID Sorting (< 16 Bit): " . ($val == 'oid:3.1.2' ? greentext('PASSED') : redtext('FAILED'))."\n";
 
$db->query("delete from ###objects where parent = 'test:1'");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('oid:2.25.317919736312109525688528068157180855579', 'test:1', '', '', '0')");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('oid:2.25.67919736312109525688528068157180855579', 'test:1', '', '', '0')");
$res = $db->query("select id from ###objects where parent = ? order by ".$db->natOrder('id'), array('test:1'));
//$res->num_rows(); // sponge
$val = $res->fetch_object()->id;
echo "Natural OID Sorting (128 Bit): " . ($val == 'oid:2.25.67919736312109525688528068157180855579' ? greentext('PASSED') : redtext('FAILED'))."\n";
 
$db->query("delete from ###objects where parent = 'test:1'");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('abc:3.1.10', 'test:1', '', '', '0')");
$db->query("insert into ###objects (id, parent, title, description, confidential) values ('abc:3.1.2', 'test:1', '', '', '0')");
$res = $db->query("select id from ###objects where parent = ? order by ".$db->natOrder('id'), array('test:1'));
//$res->num_rows(); // sponge
$val = $res->fetch_object()->id;
echo "Non-Natural Sorting for Non-OIDs: " . ($val == 'abc:3.1.10' ? greentext('PASSED') : redtext('FAILED'))."\n";
 
// --- Test insert_id()
 
$db->query("delete from ###log_object where object = 'test:1'");