diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-16 18:52:41 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-16 18:52:41 +0100 |
commit | 3f6f737c4fbcbd267ed135f968eec181d6ced508 (patch) | |
tree | 293c1988deb9c937b882f2c6c50344b12d9cb0c3 /yarns/010-tests.yarn | |
parent | 5b3ccf57b5d25547208fcdaae2ab3ec6be86a74b (diff) | |
download | copyright-statement-lint-3f6f737c4fbcbd267ed135f968eec181d6ced508.tar.gz |
Add test for combined range and itemised copyright years
Diffstat (limited to 'yarns/010-tests.yarn')
-rw-r--r-- | yarns/010-tests.yarn | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/yarns/010-tests.yarn b/yarns/010-tests.yarn index 6456ca1..e2ec72d 100644 --- a/yarns/010-tests.yarn +++ b/yarns/010-tests.yarn @@ -111,6 +111,44 @@ Range of copyright years THEN exit code is 1 AND stderr contains "FOOBAR.*2015 not contained" +Combined itemised and range of copyright years +---------------------------------------------- + + SCENARIO combined itemised and range of copyright years + GIVEN a file FOOBAR containing "Copyright 1999-2000, 2014 Foo Bar" + + GIVEN commit year is 1998 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 1 + AND stderr contains "FOOBAR.*1998 not contained" + + GIVEN commit year is 1999 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 0 + + GIVEN commit year is 2000 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 0 + + GIVEN commit year is 2001 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 1 + AND stderr contains "FOOBAR.*2001 not contained" + + GIVEN commit year is 2013 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 1 + AND stderr contains "FOOBAR.*2013 not contained" + + GIVEN commit year is 2014 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 0 + + GIVEN commit year is 2015 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 1 + AND stderr contains "FOOBAR.*2015 not contained" + Implementations =============== |