diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-16 18:49:36 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-16 18:49:36 +0100 |
commit | fefed29ece0719acefb4bc01753ec1f4349f96a9 (patch) | |
tree | d20d9974f149500ec177688cb5c942af34f51d58 /yarns/010-tests.yarn | |
parent | 64fa1ca7da69a66bd3c1a30c883654272fc78de7 (diff) | |
download | copyright-statement-lint-fefed29ece0719acefb4bc01753ec1f4349f96a9.tar.gz |
Add test suite for itemised copyright years
Diffstat (limited to 'yarns/010-tests.yarn')
-rw-r--r-- | yarns/010-tests.yarn | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/yarns/010-tests.yarn b/yarns/010-tests.yarn index 65adcfc..ec71561 100644 --- a/yarns/010-tests.yarn +++ b/yarns/010-tests.yarn @@ -45,6 +45,40 @@ Simple copyright statement THEN exit code is 1 AND stderr contains "FOOBAR.*2015 not contained" +Itemised copyright years +------------------------ + + SCENARIO itemised copyright years + GIVEN a file FOOBAR containing "Copyright 1999,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 1 + AND stderr contains "FOOBAR.*2000 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 =============== |