]> granicus.if.org Git - fortune-mod/commitdiff
correct the length message
authorShlomi Fish <shlomif@shlomifish.org>
Thu, 2 Dec 2021 06:52:52 +0000 (08:52 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Thu, 2 Dec 2021 06:52:52 +0000 (08:52 +0200)
fortune-mod/tests/t/check-cookies.t

index d2ba03499fcc1cd08c0818e92303221ac739646d..2ddb3f7ea78f2d04ccd9c2cd3c2bea36984631ca 100644 (file)
@@ -18,9 +18,11 @@ sub check_file
     {
         return "Fortune cookie file does not end in a single %";
     }
-    if ( any { length($_) > 80 } @l )
+    my $MAX_LEN = 80;
+    if ( any { length($_) > $MAX_LEN } @l )
     {
-        return "Fortune cookie file contains a line longer than 78 characters";
+        return
+"Fortune cookie file contains a line longer than $MAX_LEN characters";
     }
     if ( any { /\r/ } @l )
     {