Files
sdb/test/collision.sh
Jeffrey Crowell bdae2185e4 add failing test for collisions in the hashtable (#101)
the hashtable underlying sdb doesn't handle collisions, add a test for
this.
2016-06-28 23:35:08 +02:00

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