mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-16 19:00:58 +01:00
add more tests
This commit is contained in:
@@ -24,8 +24,16 @@ steps:
|
||||
- apk update
|
||||
- apk add --no-cache bash build-base pcre2 pcre2-dev db db-dev
|
||||
- rm -f test.db
|
||||
- build/dbtool -d test.db -i -k "test" -v "blah blah blah"
|
||||
- build/dbtool -d test.db -i -k "test" -v "blah"
|
||||
- build/dbtool -d test.db -i -k "foo" -v "bar"
|
||||
- build/dbtool -d test.db -D | grep blah
|
||||
- build/dbtool -d test.db -D | wc -l | grep 2
|
||||
- build/dbtool -d test.db -s -k test
|
||||
- build/dbtool -d test.db -S -k 't$'
|
||||
# deletion doesn't work with berkeley currently?
|
||||
#- build/dbtool -d test.db -r -k foo
|
||||
#- build/dbtool -d test.db -D | wc -l | grep 1
|
||||
|
||||
|
||||
build-gdbm:
|
||||
when:
|
||||
@@ -39,3 +47,21 @@ steps:
|
||||
- rm -f test.db
|
||||
- build/dbtool -d test.db -i -k "test" -v "blah blah blah"
|
||||
- build/dbtool -d test.db -D | grep blah
|
||||
|
||||
test-gdbm:
|
||||
when:
|
||||
event: [push]
|
||||
image: alpine:latest
|
||||
commands:
|
||||
- apk update
|
||||
- apk add --no-cache bash build-base pcre2 pcre2-dev gdbm gdbm-dev
|
||||
- rm -f test.db
|
||||
- build/dbtool -d test.db -i -k "test" -v "blah"
|
||||
- build/dbtool -d test.db -i -k "foo" -v "bar"
|
||||
- build/dbtool -d test.db -D | grep blah
|
||||
- build/dbtool -d test.db -D | wc -l | grep 2
|
||||
- build/dbtool -d test.db -s -k test
|
||||
- build/dbtool -d test.db -S -k 't$'
|
||||
- build/dbtool -d test.db -r -k foo
|
||||
- build/dbtool -d test.db -D | wc -l | grep 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user