summaryrefslogtreecommitdiff
path: root/files.yaml
blob: 4fc44ac530feec929f48b6e42b222942313915b2 (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
- given: file {filename}
  function: create_file

- given: file (?P<filename>\S+) has modification time (?P<y>\d+)-(?P<mon>\d+)-(?P<d>\d+) (?P<h>\d+):(?P<min>\d+):(?P<s>\d+)
  function: touch_file
  regex: true

- when: I remember the metadata for {filename}
  function: remember_metadata

- when: I touch {filename}
  function: update_mtime

- then: file {filename} exists
  function: file_exists

- then: file {filename} does not exist
  function: file_does_not_exist

- then: file (?P<filename>\S+) matches /(?P<regex>.+)/
  function: file_matches
  regex: true

- then: files {filename1} and {filename2} match
  function: files_match

- then: file (?P<filename>\S+) contains "(?P<pattern>.+)"
  function: file_contains
  regex: true

- then: "{filename} has the same metadata as before"
  function: has_same_metadata_as_remembered

- then: "{filename} has changed from before"
  function: has_diff_metadata_than_remembered

- then: only files (?P<filenames>.+) exist
  function: only_these_files_exist
  regex: true