From 5b3ccf57b5d25547208fcdaae2ab3ec6be86a74b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 16 Apr 2014 18:50:44 +0100 Subject: Add test for range of copyright years --- yarns/010-tests.yarn | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'yarns/010-tests.yarn') diff --git a/yarns/010-tests.yarn b/yarns/010-tests.yarn index ec71561..6456ca1 100644 --- a/yarns/010-tests.yarn +++ b/yarns/010-tests.yarn @@ -79,6 +79,39 @@ Itemised copyright years THEN exit code is 1 AND stderr contains "FOOBAR.*2015 not contained" +Range of copyright years +------------------------ + + SCENARIO range of 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 0 + + GIVEN commit year is 2013 + WHEN copyright-statement-lint is run against FOOBAR + THEN exit code is 0 + + 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 =============== -- cgit v1.2.1