summaryrefslogtreecommitdiff
path: root/yarns/010-tests.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/010-tests.yarn')
-rw-r--r--yarns/010-tests.yarn38
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
===============