# # # rename "tests/automate_inventory/inventory_hooks.lua" # to "tests/inventory_hooks.lua" # # add_dir "tests/automate_inventory_path" # # add_file "tests/automate_inventory_path/__driver__.lua" # content [f36dc66d268bbcdf72cfec59864c31a50bc0b204] # # add_file "tests/test_utils_inventory.lua" # content [3968aeff9767239a46661682c5a96db9d1a3f6e7] # # patch "tests/automate_inventory/__driver__.lua" # from [29ced4d04d7d76bee56f76dd1f575de1047de709] # to [932e35ac56e812aaf494e2059f269c657e3c35b4] # ============================================================ --- tests/automate_inventory_path/__driver__.lua f36dc66d268bbcdf72cfec59864c31a50bc0b204 +++ tests/automate_inventory_path/__driver__.lua f36dc66d268bbcdf72cfec59864c31a50bc0b204 @@ -0,0 +1,395 @@ +-- Test 'automate inventory', with path and depth restrictions +-- +-- nominal test in ../automate_inventory +-- +-- We only test issues dealing specifically with path restrictions +-- here. + +local index = 1 + +mtn_setup() + +check(getstd("inventory_hooks.lua")) + +include ("test_utils_inventory.lua") + +---------- +-- main process + +-- create a basic file history; add directories and files, then +-- operate on some of them. + +mkdir("dir_a") +mkdir("dir_b") + +addfile("file_0", "original: root file_0") +addfile("dir_a/file_a", "original: dir_a file_a") +addfile("dir_b/file_b", "original: dir_b file_b") +commit() + +-- Test that 'automate inventory' shows all directories +check(mtn("automate", "inventory"), 0, true, false) + +parsed = parse_basic_io(readfile("stdout")) + +index = check_inventory (parsed, index, +{ path = "", + old_type = "directory", + new_type = "directory", + fs_type = "none", + status = {"missing"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a/file_a", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_b/file_b", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "file_0", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +-- skip the test files in root + +-- Test that 'automate inventory --depth=0' shows only the files in root + +check(mtn("automate", "inventory", "--depth=0"), 0, true, false) + +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "", + old_type = "directory", + new_type = "directory", + fs_type = "none", + status = {"missing"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "file_0", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +-- skip tester-generated files +index = index + 3 * 10 + +-- prove that we checked all the output +checkexp ("checked all", #parsed, index-1) + +-- Test that 'automate inventory dir' shows only the files in dir + +check(mtn("automate", "inventory", "dir_a"), 0, true, false) + +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a/file_a", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +-- prove that we checked all the output +checkexp ("checked all", #parsed, index-1) + +---------- +-- Rename a file from dir_a to dir_b, bookkeep-only +check(mtn("rename", "--bookkeep-only", "dir_a/file_a", "dir_b/file_a"), 0, true, false) + +check(mtn("automate", "inventory", "dir_a"), 0, true, false) +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "dir_a/file_a", + old_type = "file", + fs_type = "file", + status = {"dropped", "unknown"}}) + +-- Should get this: +-- index = check_inventory (parsed, index, +-- { path = "dir_a/file_a", +-- old_type = "file", +-- old_path = "dir_a/file_a", +-- new_type = "file", +-- new_path = "dir_b/file_a", +-- fs_type = "file", +-- status = {"known", "renamed"}}) +-- end FIXME + +checkexp ("checked all", #parsed, index-1) + +check(mtn("automate", "inventory", "dir_b"), 0, true, false) +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "dir_b/file_a", + new_type = "file", + fs_type = "none", + status = {"added", "missing"}}) + +-- should get this: +-- index = check_inventory (parsed, index, +-- { path = "dir_b/file_a", +-- old_type = "file", +-- old_path = "dir_a/file_a", +-- new_type = "file", +-- fs_type = "none", +-- status = {"renamed", "missing"}}) +-- not clear that "missing" is the right status here +-- end FIXME + +index = check_inventory (parsed, index, +{ path = "dir_b/file_b", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +checkexp ("checked all", #parsed, index-1) + +---------- +-- same thing, actually renamed +rename("dir_a/file_a", "dir_b/file_a") + +check(mtn("automate", "inventory", "dir_a"), 0, true, false) +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "dir_a/file_a", + old_type = "file", + fs_type = "none", + status = {"dropped"}}) + +-- Should get this: +-- index = check_inventory (parsed, index, +-- { path = "dir_a/file_a", +-- old_type = "file", +-- old_path = "dir_a/file_a", +-- new_type = "file", +-- new_path = "dir_b/file_a", +-- status = {"renamed"}}) +-- end FIXME + +checkexp ("checked all", #parsed, index-1) + +check(mtn("automate", "inventory", "dir_b"), 0, true, false) +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "dir_b/file_a", + new_type = "file", + fs_type = "file", + status = {"added", "known"}}) + +-- should get this: +-- index = check_inventory (parsed, index, +-- { path = "dir_b/file_a", +-- old_type = "file", +-- old_path = "dir_a/file_a", +-- new_type = "file", +-- fs_type = "none", +-- status = {"renamed", "missing"}}) +-- not clear that "missing" is the right status here +-- end FIXME + +index = check_inventory (parsed, index, +{ path = "dir_b/file_b", + old_type = "file", + new_type = "file", + fs_type = "file", + status = {"known"}}) + +checkexp ("checked all", #parsed, index-1) + +---------- +-- rename a file from root to dir_a, test --depth=0 + +check(mtn("rename", "--bookkeep-only", "file_0", "dir_a/file_0"), 0, true, false) + +check(mtn("automate", "inventory", "--depth=0"), 0, true, false) + +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "", + old_type = "directory", + new_type = "directory", + fs_type = "none", + status = {"missing"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "file_0", + old_type = "file", + fs_type = "file", + status = {"dropped", "unknown"}}) +-- should get this: +-- index = check_inventory (parsed, index, +-- { path = "file_0", +-- old_type = "file", +-- old_name = "file_0" +-- new_type = "file", +-- new_name = "dir_a/file_0", +-- fs_type = "file", +-- status = {"renamed"}}) +-- end FIXME: + +-- skip tester-generated files +index = index + 3 * 10 + +checkexp ("checked all", #parsed, index-1) + +---------- +-- same thing, actually renamed + +rename("file_0", "dir_a/file_0") + +check(mtn("automate", "inventory", "--depth=0"), 0, true, false) + +parsed = parse_basic_io(readfile("stdout")) +index = 1 + +index = check_inventory (parsed, index, +{ path = "", + old_type = "directory", + new_type = "directory", + fs_type = "none", + status = {"missing"}}) + +index = check_inventory (parsed, index, +{ path = "dir_a", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +index = check_inventory (parsed, index, +{ path = "dir_b", + old_type = "directory", + new_type = "directory", + fs_type = "directory", + status = {"known"}}) + +-- FIXME: currently get this: +index = check_inventory (parsed, index, +{ path = "file_0", + old_type = "file", + fs_type = "none", + status = {"dropped"}}) +-- should get this: +-- index = check_inventory (parsed, index, +-- { path = "dir_a/file_0", +-- old_type = "file", +-- old_name = "file_0" +-- new_type = "file", +-- new_name = "dir_a/file_0", +-- fs_type = "file", +-- status = {"renamed"}}) +-- end FIXME: + +-- skip tester-generated files +index = index + 3 * 10 + +checkexp ("checked all", #parsed, index-1) + +-- end of file ============================================================ --- tests/test_utils_inventory.lua 3968aeff9767239a46661682c5a96db9d1a3f6e7 +++ tests/test_utils_inventory.lua 3968aeff9767239a46661682c5a96db9d1a3f6e7 @@ -0,0 +1,93 @@ +-- Functions useful in tests/automate_inventory* + +function checkexp (label, computed, expected) +-- Throw an error with a helpful message if 'computed' doesn't equal +-- 'expected'. + if computed ~= expected then + err (label .. " Expected '" .. expected .. "' got '" .. computed .. "'") + end +end + +function check_basic_io_line (label, computed, name, value) +-- Compare a parsed basic_io line 'computed' to 'name', 'value', throw +-- an error (with a helpful message) if they don't match. + checkexp(label .. ".name", computed.name, name) + + if type(value) == "table" then + checkexp(label .. ".length", #computed.values, #value) + for i = 1, #value do + checkexp(label .. i, computed.values[i], value[i]) + end + + else + checkexp(label .. ".length", #computed.values, 1) + checkexp(label .. "." .. name, computed.values[1], value) + end +end + +function find_basic_io_line (parsed, line) +-- return index in parsed (output of parse_basic_io) matching +-- line.name, line.values + for I = 1, #parsed do + if parsed[I].name == line.name then + if type (line.values) ~= "table" then + if parsed[I].values[1] == line.values then + return I + end + else + err ("searching for line with table of values not yet supported") + end + end + end + + err ("line '" .. line.name .. " " .. line.values .. "' not found") +end + +function check_inventory (parsed, parsed_index, stanza) +-- 'stanza' is a table for one stanza +-- 'parsed_index' gives the first index for this stanza in 'parsed' +-- (which should be the output of parse_basic_io). +-- Returns parsed_index incremented to the next index to check. + + check_basic_io_line (parsed_index, parsed[parsed_index], "path", stanza.path) + parsed_index = parsed_index + 1 + + if stanza.old_type then + check_basic_io_line (parsed_index, parsed[parsed_index], "old_type", stanza.old_type) + parsed_index = parsed_index + 1 + end + + if stanza.new_path then + check_basic_io_line (parsed_index, parsed[parsed_index], "new_path", stanza.new_path) + parsed_index = parsed_index + 1 + end + + if stanza.new_type then + check_basic_io_line (parsed_index, parsed[parsed_index], "new_type", stanza.new_type) + parsed_index = parsed_index + 1 + end + + if stanza.old_path then + check_basic_io_line (parsed_index, parsed[parsed_index], "old_path", stanza.old_path) + parsed_index = parsed_index + 1 + end + + if stanza.fs_type then + check_basic_io_line (parsed_index, parsed[parsed_index], "fs_type", stanza.fs_type) + parsed_index = parsed_index + 1 + end + + if stanza.status then + check_basic_io_line (parsed_index, parsed[parsed_index], "status", stanza.status) + parsed_index = parsed_index + 1 + end + + if stanza.changes then + check_basic_io_line (parsed_index, parsed[parsed_index], "changes", stanza.changes) + parsed_index = parsed_index + 1 + end + + return parsed_index +end -- check_inventory + +-- end of file ============================================================ --- tests/automate_inventory/__driver__.lua 29ced4d04d7d76bee56f76dd1f575de1047de709 +++ tests/automate_inventory/__driver__.lua 932e35ac56e812aaf494e2059f269c657e3c35b4 @@ -1,97 +1,18 @@ -local index = 1 +-- Test 'automate inventory', with no path or depth restrictions +-- +-- path and depth restrictions are tested in ../automate_inventory_path -function checkexp (label, computed, expected) - if computed ~= expected then - err (label .. " Expected '" .. expected .. "' got '" .. computed .. "'") - end -end +local index = 1 -function checkvalue (label, computed, name, value) - checkexp(label .. ".name", computed.name, name) +mtn_setup() - if type(value) == "table" then - checkexp(label .. ".length", #computed.values, #value) - for i = 1, #value do - checkexp(label .. i, computed.values[i], value[i]) - end +check(getstd("inventory_hooks.lua")) - else - checkexp(label .. ".length", #computed.values, 1) - checkexp(label .. "." .. name, computed.values[1], value) - end -end +include ("test_utils_inventory.lua") -function find_line (parsed, line) --- return index in parsed matching line.name, line.values - for I = 1, #parsed do - if parsed[I].name == line.name then - if type (line.values) ~= "table" then - if parsed[I].values[1] == line.values then - return I - end - else - err ("searching for line with table of values not yet supported") - end - end - end - - err ("line '" .. line.name .. " " .. line.values .. "' not found") -end - -function check_inventory (parsed, parsed_index, stanza) --- 'stanza' is a table for one stanza --- 'parsed_index' gives the first index for this stanza in 'parsed' --- (which should be the output of parse_basic_io). --- Returns parsed_index incremented to the last index checked. - - checkvalue (parsed_index, parsed[parsed_index], "path", stanza.path) - parsed_index = parsed_index + 1 - - if stanza.old_type then - checkvalue (parsed_index, parsed[parsed_index], "old_type", stanza.old_type) - parsed_index = parsed_index + 1 - end - - if stanza.new_path then - checkvalue (parsed_index, parsed[parsed_index], "new_path", stanza.new_path) - parsed_index = parsed_index + 1 - end - - if stanza.new_type then - checkvalue (parsed_index, parsed[parsed_index], "new_type", stanza.new_type) - parsed_index = parsed_index + 1 - end - - if stanza.old_path then - checkvalue (parsed_index, parsed[parsed_index], "old_path", stanza.old_path) - parsed_index = parsed_index + 1 - end - - if stanza.fs_type then - checkvalue (parsed_index, parsed[parsed_index], "fs_type", stanza.fs_type) - parsed_index = parsed_index + 1 - end - - if stanza.status then - checkvalue (parsed_index, parsed[parsed_index], "status", stanza.status) - parsed_index = parsed_index + 1 - end - - if stanza.changes then - checkvalue (parsed_index, parsed[parsed_index], "changes", stanza.changes) - parsed_index = parsed_index + 1 - end - - return parsed_index -end -- check_inventory - ---------- -- main process -mtn_setup() - -check(get("inventory_hooks.lua")) - -- create a basic file history; add some files, then operate on each -- of them in some way. @@ -186,7 +107,7 @@ old_path = "original", status = {"renamed", "known"}}) -- skip test.db, test_hooks.lua, tester.log, ts-stderr, ts-stdin, ts-stdout -index = find_line (parsed, {name = "path", values = "unchanged"}) +index = find_basic_io_line (parsed, {name = "path", values = "unchanged"}) -- 0 0 unchanged index = check_inventory (parsed, index, @@ -215,7 +136,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -- Only check the stanzas for the renamed files -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) -- FIXME: this output is confusing. And this file's contents are _not_ changed. check_inventory (parsed, index, @@ -228,7 +149,7 @@ check_inventory (parsed, index, status = {"renamed", "known"}, changes = "content"}) -index = find_line (parsed, {name = "path", values = "unchanged"}) +index = find_basic_io_line (parsed, {name = "path", values = "unchanged"}) -- FIXME: this output is confusing. check_inventory (parsed, index, @@ -252,7 +173,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -- Only check the stanzas for the renamed files -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, {path = "original", @@ -263,7 +184,7 @@ check_inventory (parsed, index, fs_type = "file", status = {"renamed", "known"}}) -index = find_line (parsed, {name = "path", values = "unchanged"}) +index = find_basic_io_line (parsed, {name = "path", values = "unchanged"}) -- FIXME: this output is confusing. check_inventory (parsed, index, @@ -286,7 +207,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) -- FIXME: this output is confusing. check_inventory (parsed, index, @@ -311,7 +232,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "dropped"}) +index = find_basic_io_line (parsed, {name = "path", values = "dropped"}) check_inventory (parsed, index, {path = "dropped", @@ -323,7 +244,7 @@ old_path = "original", status = {"renamed", "known"}, changes = "content"}) -index = find_line (parsed, {name = "path", values = "missing"}) +index = find_basic_io_line (parsed, {name = "path", values = "missing"}) check_inventory (parsed, index, { path = "missing", @@ -335,7 +256,7 @@ old_path = "dropped", status = {"renamed", "known"}, changes = "content"}) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, { path = "original", @@ -358,7 +279,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "dropped"}) +index = find_basic_io_line (parsed, {name = "path", values = "dropped"}) -- FIXME: the only difference between this and the previous case is the absense of the erroneous 'changes'. check_inventory (parsed, index, @@ -370,7 +291,7 @@ old_path = "original", fs_type = "file", status = {"renamed", "known"}}) -index = find_line (parsed, {name = "path", values = "missing"}) +index = find_basic_io_line (parsed, {name = "path", values = "missing"}) check_inventory (parsed, index, { path = "missing", @@ -381,7 +302,7 @@ old_path = "dropped", fs_type = "file", status = {"renamed", "known"}}) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, { path = "original", @@ -402,7 +323,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "dropped"}) +index = find_basic_io_line (parsed, {name = "path", values = "dropped"}) check_inventory (parsed, index, {path = "dropped", @@ -421,7 +342,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "added"}) +index = find_basic_io_line (parsed, {name = "path", values = "added"}) check_inventory (parsed, index, {path = "added", @@ -440,7 +361,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, {path = "original", @@ -449,7 +370,7 @@ new_path = "renamed", fs_type = "file", status = {"renamed", "unknown"}}) -index = find_line (parsed, {name = "path", values = "renamed"}) +index = find_basic_io_line (parsed, {name = "path", values = "renamed"}) check_inventory (parsed, index, {path = "renamed", @@ -468,7 +389,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, {path = "original", @@ -477,7 +398,7 @@ new_type = "file", fs_type = "none", status = {"missing"}}) -index = find_line (parsed, {name = "path", values = "renamed"}) +index = find_basic_io_line (parsed, {name = "path", values = "renamed"}) check_inventory (parsed, index, {path = "renamed", @@ -496,7 +417,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "original"}) +index = find_basic_io_line (parsed, {name = "path", values = "original"}) check_inventory (parsed, index, {path = "original", @@ -505,7 +426,7 @@ new_path = "renamed", fs_type = "none", status = {"renamed"}}) -index = find_line (parsed, {name = "path", values = "renamed"}) +index = find_basic_io_line (parsed, {name = "path", values = "renamed"}) check_inventory (parsed, index, {path = "renamed", @@ -522,7 +443,7 @@ parsed = parse_basic_io(readfile("stdout parsed = parse_basic_io(readfile("stdout")) -index = find_line (parsed, {name = "path", values = "new_dir"}) +index = find_basic_io_line (parsed, {name = "path", values = "new_dir"}) check_inventory (parsed, index, {path = "new_dir", @@ -534,7 +455,7 @@ parsed = parse_basic_io(readfile("stdout check(mtn("automate", "inventory", "--rcfile=inventory_hooks.lua"), 0, true, false) parsed = parse_basic_io(readfile("stdout")) -check_inventory (parsed, find_line (parsed, {name = "path", values = "new_dir"}), +check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "new_dir"}), { path = "new_dir", new_type = "directory", fs_type = "none", @@ -545,7 +466,7 @@ parsed = parse_basic_io(readfile("stdout check(mtn("automate", "inventory", "--rcfile=inventory_hooks.lua"), 0, true, false) parsed = parse_basic_io(readfile("stdout")) -check_inventory (parsed, find_line (parsed, {name = "path", values = "new_dir"}), +check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "new_dir"}), {path = "new_dir", old_type = "directory", new_type = "directory", @@ -557,10 +478,12 @@ parsed = parse_basic_io(readfile("stdout check(mtn("automate", "inventory", "--rcfile=inventory_hooks.lua"), 0, true, false) parsed = parse_basic_io(readfile("stdout")) -check_inventory (parsed, find_line (parsed, {name = "path", values = "new_dir"}), +check_inventory (parsed, find_basic_io_line (parsed, {name = "path", values = "new_dir"}), { path = "new_dir", old_type = "directory", fs_type = "none", status = {"dropped"}}) -- some tests for renaming directories are still missing here! + +-- end of file