mirror of
https://codeberg.org/scip/anydb.git
synced 2025-12-17 04:20:59 +01:00
finalized conversion to protobuf:
- fixed import+export - generalized file options - always store keys as lowercase - fixed+enhanced docs - fixed tests
This commit is contained in:
@@ -32,3 +32,20 @@ stdout 50
|
||||
# look if it's inside the db
|
||||
exec anydb -f test.db ls
|
||||
stdout datum.*binary-content
|
||||
|
||||
# do the same thing with text content, start with a new text entry
|
||||
exec anydb -f test.db set feed alpha
|
||||
|
||||
# which we write to a file
|
||||
exec anydb -f test.db get feed -o out2.txt
|
||||
exists out2.txt
|
||||
|
||||
# check if its filled (5 bytes + newline)
|
||||
exec ls -l out2.txt
|
||||
stdout 6
|
||||
|
||||
# compare content
|
||||
exec cat out2.txt
|
||||
stdout alpha
|
||||
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ exec anydb -f test.db export -o backup.json
|
||||
stdout 'database contents exported to backup.json'
|
||||
|
||||
# import into new db
|
||||
exec anydb -f new.db import -r backup.json
|
||||
exec anydb -f new.db import -i backup.json
|
||||
stdout 'imported.*entries'
|
||||
|
||||
# check contents
|
||||
exec anydb -f new.db list
|
||||
exec anydb -f new.db list bar -s
|
||||
stdout foo.*bar
|
||||
|
||||
|
||||
@@ -37,12 +37,12 @@ exec anydb -f test.db list -t flower
|
||||
! stdout bar
|
||||
|
||||
# list with filter
|
||||
exec anydb -f test.db list b.r
|
||||
exec anydb -f test.db list b.r -s
|
||||
stdout bar
|
||||
|
||||
# list with -i filter
|
||||
exec anydb -f test.db list -i mucha
|
||||
stdout MUCHA
|
||||
exec anydb -f test.db list -is mucha
|
||||
stdout mucha
|
||||
|
||||
# get single entry
|
||||
exec anydb -f test.db get color
|
||||
|
||||
Reference in New Issue
Block a user