diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-08-05 19:22:03 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-08-05 19:22:03 +0100 |
commit | 92309960338d8628fcc5d08edd2e67d4d0c722cc (patch) | |
tree | 5b8c11658bc76fb6bfb1ce345f3ef768733047cf /clab.yarn | |
parent | bc24d9419ee131cab3cfcbe209cf1a79c29b421b (diff) | |
download | clab-92309960338d8628fcc5d08edd2e67d4d0c722cc.tar.gz |
Add test case for multiple records in a single file
Diffstat (limited to 'clab.yarn')
-rw-r--r-- | clab.yarn | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -41,6 +41,25 @@ sure searches find only the right records. AND Bob is not found AND bob@example.com is not found +Put several records in one file. + + SCENARIO files with multiple records + GIVEN an empty database + AND records for Alice (alice@example.com) and Bob (bob@example.com) + WHEN listing all records + THEN Alice is found + AND Bob is found + + WHEN searching for Alice + THEN Alice is found + AND Bob is not found + + WHEN mutt-querying for Alice + THEN Alice is found + AND alice@example.com is found + AND Bob is not found + AND bob@example.com is not found + Implementation -------------- @@ -55,6 +74,14 @@ These implement the various steps. email: $MATCH_2 EOF + IMPLEMENTS GIVEN records for (\S+) \((\S+)\) and (\S+) \((\S+)\) + cat << EOF > "$DATADIR/db/foo.yaml" + - name: $MATCH_1 + email: $MATCH_2 + - name: $MATCH_3 + email: $MATCH_4 + EOF + IMPLEMENTS WHEN listing all records ./clab --no-default-config --db "$DATADIR/db" list > "$DATADIR/output" |