diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-31 18:30:23 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-31 20:22:55 +0300 |
commit | 8643b23b7bdc8b56d5f87178871070739622c43e (patch) | |
tree | 20a3484dd0e0677b79bd0c57ce2979d03755c9c0 /cachedir.md | |
parent | 4402c3a02e15a7d1538bad6df616bbef2983a600 (diff) | |
download | cachedir-rs-8643b23b7bdc8b56d5f87178871070739622c43e.tar.gz |
feat: implement find, tag, untag, is-tag
Sponsored-by: author
Diffstat (limited to 'cachedir.md')
-rw-r--r-- | cachedir.md | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cachedir.md b/cachedir.md index 2f2607a..246cc5d 100644 --- a/cachedir.md +++ b/cachedir.md @@ -49,12 +49,14 @@ tags as requested._ We should find no cache directories, if there aren't any. - -given an installed cachedir - ~~~scenario +given an installed cachedir when I run cachedir find . then stdout is exactly "" +when I try to run cachedir is-cache foo +then command fails +when I try to run cachedir is-cache bar +then command fails ~~~ When we create a directory, and a `CACHEDIR.TAG` file with the wrong @@ -63,8 +65,12 @@ contents, it's not a cache directory. ~~~scenario given a directory foo given file foo/CACHEDIR.TAG from not-a-tag -when I run cachedir . +when I run cachedir find . then stdout is exactly "" +when I try to run cachedir is-cache foo +then command fails +when I try to run cachedir is-cache bar +then command fails ~~~ When we create an actual tag, the directory is found. @@ -74,6 +80,10 @@ given a directory bar when I run cachedir tag bar when I run cachedir find . then stdout contains "/bar" +when I try to run cachedir is-cache foo +then command fails +when I try to run cachedir is-cache bar +then command is successful ~~~ Finally, we should again find no cache directories if we remove that tag. @@ -82,4 +92,8 @@ Finally, we should again find no cache directories if we remove that tag. when I run cachedir untag bar when I run cachedir find . then stdout is exactly "" +when I try to run cachedir is-cache foo +then command fails +when I try to run cachedir is-cache bar +then command fails ~~~ |