blob: 46722e879ac0e51e8903e958bc1de82c102915b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
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"
|