From 72640ade4cd87e1768246a42f7fa313ea8fef237 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Thu, 26 Apr 2012 10:56:21 +0930 Subject: [PATCH] First output field of "rhizome list" is column count --- rhizome_database.c | 1 + tests/dna_rhizome | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rhizome_database.c b/rhizome_database.c index 366d4c77..f32e5abc 100644 --- a/rhizome_database.c +++ b/rhizome_database.c @@ -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(":"); diff --git a/tests/dna_rhizome b/tests/dna_rhizome index 2bcee402..ab429d15 100755 --- a/tests/dna_rhizome +++ b/tests/dna_rhizome @@ -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='[^:]\+'