mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-17 03:10:57 +01:00
unitfixes (#3)
- fix regex match padding - fix key copying - add more unit tests
This commit is contained in:
@@ -44,9 +44,17 @@ steps:
|
||||
# check modified key
|
||||
- build/dbtool -d test.db -s -k test | grep modified
|
||||
# use splitting with regex
|
||||
- printf "today:100\nyesterday:500\n" | build/dbtool -d test.db -i -f -t '^([^:]*):([^:]*)'
|
||||
- echo today:100 | build/dbtool -d test.db -i -f -t '^([^:]*):([^:]*)'
|
||||
# check if it works
|
||||
- cat /etc/passwd | build/dbtool -d test.db -s -k today | grep 100
|
||||
- build/dbtool -d test.db -s -k today | grep 100
|
||||
# use splitting with regex reverse
|
||||
- echo today:cold | build/dbtool -d test.db -R -i -f -t '^([^:]*):([^:]*)'
|
||||
# check if it works
|
||||
- build/dbtool -d test.db -s -k cold | grep today
|
||||
# check encryption
|
||||
- build/dbtool -d test.db -i -k borg -v sevenofnine -p -P foobar
|
||||
- build/dbtool -d test.db -s -k borg -p -P foobar | grep sevenofnine
|
||||
|
||||
|
||||
|
||||
build-gdbm:
|
||||
@@ -90,7 +98,14 @@ steps:
|
||||
# check modified key
|
||||
- build/dbtool -d test.db -s -k test | grep modified
|
||||
# use splitting with regex
|
||||
- printf "today:100\nyesterday:500\n" | build/dbtool -d test.db -i -f -t '^([^:]*):([^:]*)'
|
||||
- echo today:100 | build/dbtool -d test.db -i -f -t '^([^:]*):([^:]*)'
|
||||
# check if it works
|
||||
- cat /etc/passwd | build/dbtool -d test.db -s -k today | grep 100
|
||||
- build/dbtool -d test.db -s -k today | grep 100
|
||||
# use splitting with regex reverse
|
||||
- echo today:cold | build/dbtool -d test.db -R -i -f -t '^([^:]*):([^:]*)'
|
||||
# check if it works
|
||||
- build/dbtool -d test.db -s -k cold | grep today
|
||||
# check encryption
|
||||
- build/dbtool -d test.db -i -k borg -v sevenofnine -p -P foobar
|
||||
- build/dbtool -d test.db -s -k borg -p -P foobar | grep sevenofnine
|
||||
|
||||
|
||||
Reference in New Issue
Block a user