diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-12-05 17:40:26 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-12-05 17:40:26 +0000 |
commit | cf5ce3a40e8610d5df33ea2e6a0722d670658075 (patch) | |
tree | 59e143aaeeced7572379ad6b2519e52da31f674c /yarns/0040-generations.yarn | |
parent | ac42720f7d0309036c6af31372f28d13c7da5d80 (diff) | |
download | obnam-cf5ce3a40e8610d5df33ea2e6a0722d670658075.tar.gz |
Convert ls tests to better yarn
Diffstat (limited to 'yarns/0040-generations.yarn')
-rw-r--r-- | yarns/0040-generations.yarn | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/yarns/0040-generations.yarn b/yarns/0040-generations.yarn index adc7d849..61de6ce4 100644 --- a/yarns/0040-generations.yarn +++ b/yarns/0040-generations.yarn @@ -50,7 +50,30 @@ commands should show that number of generations. Listing contents of a generation (`obnam ls`) -------------------------------- -FIXME. +We'll assume the `obnam ls` command shows any generation. +However, there's a couple of ways of using it: either listing +everything, or only a specific directory to list. + + SCENARIO list generation content + GIVEN 1MB of new data in directory D + WHEN user backs up directory D + AND user lists latest generation into all.txt + THEN all.txt matches /.*/D/. + WHEN user lists D in latest generation into some.txt + THEN all lines in some.txt match (/D|Generation) + +The first line of the generation listing contains the word +"Generation". Every other line should contain the directory we +requested as part of the pathname. + +There was a bug in Obnam 1.5 (and possibly other versions) that +listing contents of a directory that ends in a slash (but isn't the +root directory) fails. The following is a test for that bug by +requesting `D/` to be listed, and verifying that we get at least one +line for that. + + WHEN user lists D/ in latest generation into bug.txt + THEN some.txt matches /D Comparing generations (`obnam diff`) ------------------------------------ |