First output field of "rhizome list" is column count

This commit is contained in:
Andrew Bettison 2012-04-26 10:56:21 +09:30
parent e74f6ca7c2
commit 72640ade4c
2 changed files with 4 additions and 2 deletions

View File

@ -529,6 +529,7 @@ int rhizome_list_manifests(int limit, int offset)
ret = WHY(sqlite3_errmsg(rhizome_db));
} else {
size_t rows = 0;
cli_puts("8"); cli_delim("\n"); // number of columns
cli_puts("fileid"); cli_delim(":");
cli_puts("manifestid"); cli_delim(":");
cli_puts("version"); cli_delim(":");

View File

@ -28,8 +28,9 @@ setup_dna_rhizome() {
assert_rhizome_list() {
executeOk $dna rhizome list
assertStdoutLineCount '==' $(($# + 1))
assertStdoutIs --line=1 -e 'fileid:manifestid:version:inserttime:length:datavalid:date:name\n'
assertStdoutLineCount '==' $(($# + 2))
assertStdoutIs --line=1 -e '8\n'
assertStdoutIs --line=2 -e 'fileid:manifestid:version:inserttime:length:datavalid:date:name\n'
local filename
for filename; do
local filehash='[^:]\+'