I've checked in a change on the nvm.basic_io.inventory branch to tests/automate_inventory/__driver__.lua; it now passes with the current 'automate inventory' output.
I added some "FIXME" comments where I think things are confusing or wrong. I think the format of the tests is now quite readable, and should be easy to keep in sync with any changes to the automate inventory output. Some of the Lua functions I added could be useful in other tests: function checkexp (label, computed, expected) -- Throw an error with a helpful message if 'computed' doesn't equal -- 'expected'. function checkvalue (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. function find_line (parsed, line) -- return index in parsed (output of parse_basic_io) matching -- line.name, line.values The 'helpful message' makes it easier to understand why a test failed. I think these could be added to testlib.lua, but I'm not sure about the naming conventions. -- -- Stephe _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
