mirror of
https://github.com/radareorg/sdb.git
synced 2026-11-12 12:01:40 -10:00
the hashtable underlying sdb doesn't handle collisions, add a test for this.
16 lines
206 B
Bash
Executable File
16 lines
206 B
Bash
Executable File
#!/bin/sh
|
|
DB=___collide.db
|
|
SDB=../src/sdb
|
|
rm -f $DB
|
|
$SDB $DB cb=A
|
|
$SDB $DB bC=B
|
|
R=`$SDB $DB cb`
|
|
if [ "$R" == "A" ]; then
|
|
echo "OK: collision"
|
|
rm -f $DB
|
|
exit 0
|
|
fi
|
|
echo "ERROR: collision"
|
|
rm -f $DB
|
|
exit 1
|