summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win')
-rw-r--r--t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/fill-values3
-rw-r--r--t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi6
-rwxr-xr-xt/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/pre-build45
-rw-r--r--t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/desc2
-rw-r--r--t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/hints1
5 files changed, 57 insertions, 0 deletions
diff --git a/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/fill-values b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/fill-values
new file mode 100644
index 0000000..85fc8d9
--- /dev/null
+++ b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: cruft-gfdl-fp-sliding-win
+Description: Check for FP with GFDL invariants sections
diff --git a/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi
new file mode 100644
index 0000000..d9c1b54
--- /dev/null
+++ b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/orig/src/normal.texi
@@ -0,0 +1,6 @@
+Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License,
+version 1.3 or any later version published by the Free Software
+Foundation; with no Invariant Sections, no Front-Cover Texts and
+no Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
diff --git a/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/pre-build b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/pre-build
new file mode 100755
index 0000000..5ee6c94
--- /dev/null
+++ b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/build-spec/pre-build
@@ -0,0 +1,45 @@
+#!/usr/bin/perl
+
+# Attempt to break the GFDL so that the "redeeming" part of the
+# license gets in the window /after/ the triggering part. c/cruft
+# handles this case correctly now and we don't want to mess that up
+# later.
+
+use strict;
+use warnings;
+
+# Keep in sync with checks/cruft
+use constant BLOCK_SIZE => 16_384;
+
+my ($rootdir) = @ARGV;
+my $dir = "$rootdir/debian/src";
+my $file = "$dir/good.texi";
+
+unless (-d $dir) {
+ mkdir $dir or die "mkdir $dir: $!";
+}
+
+my $slash = '/';
+my $gfdl_start = <<EOT ;
+Permission is granted to copy, distribute and${slash}or modify this
+document under the terms of the GNU Free Documentation License,
+version 1.3 or any later version published by the Free Software
+Foundation;
+EOT
+
+my $gfdl_end = <<EOT;
+with no Invariant Sections, no Front-Cover Texts and
+no Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+EOT
+
+my $fill = BLOCK_SIZE - length $gfdl_start;
+my $prefix = ' ' x ($fill - 1);
+
+open my $fd, '>', $file or die "open $file: $!";
+
+print {$fd} $prefix, "\n";
+print {$fd} $gfdl_start;
+print {$fd} $gfdl_end;
+
+close $fd or die "close $file: $!";
diff --git a/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/desc b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/desc
new file mode 100644
index 0000000..94e67b4
--- /dev/null
+++ b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/desc
@@ -0,0 +1,2 @@
+Testname: cruft-gfdl-fp-sliding-win
+Check: files/contents/line-length
diff --git a/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/hints b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/hints
new file mode 100644
index 0000000..6a5fc39
--- /dev/null
+++ b/t/recipes/checks/files/contents/line-length/cruft-gfdl-fp-sliding-win/eval/hints
@@ -0,0 +1 @@
+cruft-gfdl-fp-sliding-win (source): very-long-line-length-in-source-file 16183 > 512 [debian/src/good.texi:1]