Metadata manipulation ===================== This chapter contains scenarios for testing the distix hidden commands for manipulation of metadata files. There are three commands, `_set`, `_get`, and `_list`, and they'll be tested together, since they interact with each other. SCENARIO metadata manipulation To start with, the `_list` command should give an error if the metadata file doesn't exist. WHEN user attempts to run distix _list METADATA THEN attempt failed AND error message matches R56497X An empty file should result in empty output. GIVEN file METADATA containing "" WHEN user attempts to run distix _list METADATA THEN attempt succeeded AND output is "" A file with a single key/value pair. GIVEN file METADATA containing "key:\n- value" WHEN user attempts to run distix _list METADATA THEN attempt succeeded AND output is "key=value\n" WHEN user attempts to run distix _get METADATA key THEN attempt succeeded AND output is "key=value\n" Set a key/value pair, in an existing file. WHEN user attempts to run distix _set METADATA key2=value2 THEN attempt succeeded WHEN user attempts to run distix _list METADATA THEN attempt succeeded AND output is "key=value\nkey2=value2\n" Set a key/value pair, in a non-existent file. WHEN user attempts to run distix _set NEWMETA key2=value2 THEN attempt succeeded WHEN user attempts to run distix _list NEWMETA THEN attempt succeeded AND output is "key2=value2\n"