From fefed29ece0719acefb4bc01753ec1f4349f96a9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 16 Apr 2014 18:49:36 +0100 Subject: Add test suite for itemised copyright years --- yarns/010-tests.yarn | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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 =============== -- cgit v1.2.1