Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] add descriptions for basic tests #16045

Closed
p5pRT opened this issue Jun 26, 2017 · 12 comments
Closed

[PATCH] add descriptions for basic tests #16045

p5pRT opened this issue Jun 26, 2017 · 12 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 26, 2017

Migrated from rt.perl.org#131655 (status was 'open')

Searchable as RT131655$

@p5pRT
Copy link
Author

p5pRT commented Jun 26, 2017

From vitali.peil@uni-bielefeld.de

Created by vitali.peil@uni-bielefeld.de

First of all​: this is my first perl patch.
The file Porting/todo.pod mentions missing test descriptions for
a bunch of tests. So, I've started working on this.

If it's appropriate I can add more of this in the future. If not,
please tell me what I can do better.

Perl Info

Flags:
     category=utilities
     severity=wishlist
     Type=Patch
     PatchStatus=HasPatch

Site configuration information for perl 5.27.1:

Configured by vpeil at Fri Jun 23 13:48:03 CEST 2017.

Summary of my perl5 (revision 5 version 27 subversion 1) configuration:
   Derived from: b9645564d5ebc1cf394966d175426685771ef1c6
   Platform:
     osname=linux
     osvers=3.16.0-4-amd64
     archname=x86_64-linux
     uname='linux ubi 3.16.0-4-amd64 #1 smp debian 3.16.43-2 
(2017-04-30) x86_64 gnulinux '
     config_args='-des -Dusedevel'
     hint=previous
     useposix=true
     d_sigaction=define
     useithreads=undef
     usemultiplicity=undef
     use64bitint=define
     use64bitall=define
     uselongdouble=undef
     usemymalloc=n
     default_inc_excludes_dot=define
     bincompat5005=undef
   Compiler:
     cc='cc'
     ccflags ='-fwrapv -fno-strict-aliasing -pipe 
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
     optimize='-O2'
     cppflags='-fwrapv -fno-strict-aliasing -pipe 
-fstack-protector-strong -I/usr/local/include'
     ccversion=''
     gccversion='4.9.2'
     gccosandvers=''
     intsize=4
     longsize=8
     ptrsize=8
     doublesize=8
     byteorder=12345678
     doublekind=3
     d_longlong=define
     longlongsize=8
     d_longdbl=define
     longdblsize=16
     longdblkind=3
     ivtype='long'
     ivsize=8
     nvtype='double'
     nvsize=8
     Off_t='off_t'
     lseeksize=8
     alignbytes=8
     prototype=define
   Linker and Libraries:
     ld='cc'
     ldflags =' -fstack-protector-strong -L/usr/local/lib'
     libpth=/usr/local/lib 
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed 
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib 
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib 
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed 
/usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib 
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed 
/usr/include/x86_64-linux-gnu /usr/lib
     libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
     perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
     libc=libc-2.19.so
     so=so
     useshrplib=false
     libperl=libperl.a
     gnulibc_version='2.19'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs
     dlext=so
     d_dlsymun=undef
     ccdlflags='-Wl,-E'
     cccdlflags='-fPIC'
     lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Locally applied patches:
     uncommitted-changes


@INC for perl 5.27.1:
     lib
     /usr/local/lib/perl5/site_perl/5.27.1/x86_64-linux
     /usr/local/lib/perl5/site_perl/5.27.1
     /usr/local/lib/perl5/5.27.1/x86_64-linux
     /usr/local/lib/perl5/5.27.1


Environment for perl 5.27.1:
     HOME=/home/vpeil
     LANG=de_DE.UTF-8
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
PATH=/home/vpeil/.plenv/shims:/home/vpeil/.plenv/bin:/usr/local/go/bin:/usr/lib/dart/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/sbin:/usr/sbin:/sbin
     PERL_BADLANG (unset)
     SHELL=/bin/bash

--------------1.40.perlbug
Content-Type: text/x-patch; 
name="0001-add-test-descriptions-for-some-basic-tests.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; 
filename="0001-add-test-descriptions-for-some-basic-tests.patch"

 From 3fee568137415c16677c1c370f2f949540e66213 Mon Sep 17 00:00:00 2001
From: Vitali Peil <vitali.peil@uni-bielefeld.de>
Date: Fri, 23 Jun 2017 13:47:53 +0200
Subject: [PATCH] add test descriptions for some basic tests


  AUTHORS            |  1 +
  t/base/cond.t      | 16 ++++++++--------
  t/base/if.t        |  4 ++--
  t/base/pat.t       |  4 ++--
  t/base/translate.t |  7 +++----
  5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7fdb694..7b5d912 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1250,6 +1250,7 @@ Victor Efimov <victor@vsespb.ru>
  Viktor Turskyi            <koorchik@gmail.com>
  Ville Skyttä            <scop@cs132170.pp.htv.fi>
  Vincent Pit            <perl@profvince.com>
+Vitali Peil            <vitali.peil@uni-bielefeld.de>
  Vishal Bhatia            <vishal@deja.com>
  Vlad Harchev            <hvv@hippo.ru>
  Vladimir Alexiev        <vladimir@cs.ualberta.ca>
diff --git a/t/base/cond.t b/t/base/cond.t
index e2ef358..0b41fe0 100644
--- a/t/base/cond.t
+++ b/t/base/cond.t
@@ -6,12 +6,12 @@ print "1..4\n";

  $x = '0';

-$x eq $x && (print "ok 1\n");
-$x ne $x && (print "not ok 1\n");
-$x eq $x || (print "not ok 2\n");
-$x ne $x || (print "ok 2\n");
+$x eq $x && (print "ok 1 - operator eq\n");
+$x ne $x && (print "not ok 1 - operator ne\n");
+$x eq $x || (print "not ok 2 - operator eq\n");
+$x ne $x || (print "ok 2 - operator ne\n");

-$x == $x && (print "ok 3\n");
-$x != $x && (print "not ok 3\n");
-$x == $x || (print "not ok 4\n");
-$x != $x || (print "ok 4\n");
+$x == $x && (print "ok 3 - operator ==\n");
+$x != $x && (print "not ok 3 - operator !=\n");
+$x == $x || (print "not ok 4 - operator ==\n");
+$x != $x || (print "ok 4 - operator !=\n");
diff --git a/t/base/if.t b/t/base/if.t
index f093b0d..be86d4c 100644
--- a/t/base/if.t
+++ b/t/base/if.t
@@ -5,5 +5,5 @@ print "1..2\n";
  # first test to see if we can run the tests.

  $x = 'test';
-if ($x eq $x) { print "ok 1\n"; } else { print "not ok 1\n";}
-if ($x ne $x) { print "not ok 2\n"; } else { print "ok 2\n";}
+if ($x eq $x) { print "ok 1 - if eq\n"; } else { print "not ok 1 - if 
eq\n";}
+if ($x ne $x) { print "not ok 2 - if ne\n"; } else { print "ok 2 - if 
ne\n";}
diff --git a/t/base/pat.t b/t/base/pat.t
index 9e3f615..2d02fa0 100644
--- a/t/base/pat.t
+++ b/t/base/pat.t
@@ -5,5 +5,5 @@ print "1..2\n";
  # first test to see if we can run the tests.

  $_ = 'test';
-if (/^test/) { print "ok 1\n"; } else { print "not ok 1\n";}
-if (/^foo/) { print "not ok 2\n"; } else { print "ok 2\n";}
+if (/^test/) { print "ok 1 - match regex\n"; } else { print "not ok 1 - 
match regex\n";}
+if (/^foo/) { print "not ok 2 - match regex\n"; } else { print "ok 2 - 
match regex\n";}
diff --git a/t/base/translate.t b/t/base/translate.t
index 614f22c..a25ae8e 100644
--- a/t/base/translate.t
+++ b/t/base/translate.t
@@ -1,7 +1,7 @@
  #!./perl

  # Verify round trip of translations from the native character set to 
unicode
-# and back work.  If this is wrong, nothing will be reliable.
+# and back work. If this is wrong, nothing will be reliable.

  print "1..257\n";   # 0-255 plus one beyond

@@ -14,7 +14,7 @@ for my $i (0 .. 255) {
          print "not ";
      }
      print "ok ";
-    print $i + 1;
+    print $i + 1 . " - native_to_unicode $i";
      print "\n";
  }

@@ -23,5 +23,4 @@ for my $i (0 .. 255) {
  if (utf8::unicode_to_native(utf8::native_to_unicode(100000)) != 100000) {
      print "not ";
  }
-print "ok ";
-print "257\n";
+print "ok 257 - native_to_unicode of large number\n";
-- 
2.1.4


--------------1.40.perlbug--


@p5pRT
Copy link
Author

p5pRT commented Jun 26, 2017

From vitali.peil@uni-bielefeld.de

0001-add-test-descriptions-for-some-basic-tests.patch
From 3fee568137415c16677c1c370f2f949540e66213 Mon Sep 17 00:00:00 2001
From: Vitali Peil <vitali.peil@uni-bielefeld.de>
Date: Fri, 23 Jun 2017 13:47:53 +0200
Subject: [PATCH] add test descriptions for some basic tests

---
 AUTHORS            |  1 +
 t/base/cond.t      | 16 ++++++++--------
 t/base/if.t        |  4 ++--
 t/base/pat.t       |  4 ++--
 t/base/translate.t |  7 +++----
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7fdb694..7b5d912 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1250,6 +1250,7 @@ Victor Efimov			<victor@vsespb.ru>
 Viktor Turskyi			<koorchik@gmail.com>
 Ville Skyttä			<scop@cs132170.pp.htv.fi>
 Vincent Pit			<perl@profvince.com>
+Vitali Peil			<vitali.peil@uni-bielefeld.de>
 Vishal Bhatia			<vishal@deja.com>
 Vlad Harchev			<hvv@hippo.ru>
 Vladimir Alexiev		<vladimir@cs.ualberta.ca>
diff --git a/t/base/cond.t b/t/base/cond.t
index e2ef358..0b41fe0 100644
--- a/t/base/cond.t
+++ b/t/base/cond.t
@@ -6,12 +6,12 @@ print "1..4\n";
 
 $x = '0';
 
-$x eq $x && (print "ok 1\n");
-$x ne $x && (print "not ok 1\n");
-$x eq $x || (print "not ok 2\n");
-$x ne $x || (print "ok 2\n");
+$x eq $x && (print "ok 1 - operator eq\n");
+$x ne $x && (print "not ok 1 - operator ne\n");
+$x eq $x || (print "not ok 2 - operator eq\n");
+$x ne $x || (print "ok 2 - operator ne\n");
 
-$x == $x && (print "ok 3\n");
-$x != $x && (print "not ok 3\n");
-$x == $x || (print "not ok 4\n");
-$x != $x || (print "ok 4\n");
+$x == $x && (print "ok 3 - operator ==\n");
+$x != $x && (print "not ok 3 - operator !=\n");
+$x == $x || (print "not ok 4 - operator ==\n");
+$x != $x || (print "ok 4 - operator !=\n");
diff --git a/t/base/if.t b/t/base/if.t
index f093b0d..be86d4c 100644
--- a/t/base/if.t
+++ b/t/base/if.t
@@ -5,5 +5,5 @@ print "1..2\n";
 # first test to see if we can run the tests.
 
 $x = 'test';
-if ($x eq $x) { print "ok 1\n"; } else { print "not ok 1\n";}
-if ($x ne $x) { print "not ok 2\n"; } else { print "ok 2\n";}
+if ($x eq $x) { print "ok 1 - if eq\n"; } else { print "not ok 1 - if eq\n";}
+if ($x ne $x) { print "not ok 2 - if ne\n"; } else { print "ok 2 - if ne\n";}
diff --git a/t/base/pat.t b/t/base/pat.t
index 9e3f615..2d02fa0 100644
--- a/t/base/pat.t
+++ b/t/base/pat.t
@@ -5,5 +5,5 @@ print "1..2\n";
 # first test to see if we can run the tests.
 
 $_ = 'test';
-if (/^test/) { print "ok 1\n"; } else { print "not ok 1\n";}
-if (/^foo/) { print "not ok 2\n"; } else { print "ok 2\n";}
+if (/^test/) { print "ok 1 - match regex\n"; } else { print "not ok 1 - match regex\n";}
+if (/^foo/) { print "not ok 2 - match regex\n"; } else { print "ok 2 - match regex\n";}
diff --git a/t/base/translate.t b/t/base/translate.t
index 614f22c..a25ae8e 100644
--- a/t/base/translate.t
+++ b/t/base/translate.t
@@ -1,7 +1,7 @@
 #!./perl
 
 # Verify round trip of translations from the native character set to unicode
-# and back work.  If this is wrong, nothing will be reliable.
+# and back work. If this is wrong, nothing will be reliable.
 
 print "1..257\n";   # 0-255 plus one beyond
 
@@ -14,7 +14,7 @@ for my $i (0 .. 255) {
         print "not ";
     }
     print "ok ";
-    print $i + 1;
+    print $i + 1 . " - native_to_unicode $i";
     print "\n";
 }
 
@@ -23,5 +23,4 @@ for my $i (0 .. 255) {
 if (utf8::unicode_to_native(utf8::native_to_unicode(100000)) != 100000) {
     print "not ";
 }
-print "ok ";
-print "257\n";
+print "ok 257 - native_to_unicode of large number\n";
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Jun 26, 2017

From @jkeenan

On Mon, 26 Jun 2017 06​:37​:37 GMT, vitali.peil@​uni-bielefeld.de wrote​:

This is a multi-part message in MIME format.
--------------1.40.perlbug
Content-Type​: text/plain; format=fixed
Content-Transfer-Encoding​: 8bit

This is a bug report for perl from vitali.peil@​uni-bielefeld.de,
generated with the help of perlbug 1.40 running under perl 5.27.1.

-----------------------------------------------------------------
[Please describe your issue here]

First of all​: this is my first perl patch.
The file Porting/todo.pod mentions missing test descriptions for
a bunch of tests. So, I've started working on this.

If it's appropriate I can add more of this in the future. If not,
please tell me what I can do better.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=utilities
severity=wishlist
Type=Patch
PatchStatus=HasPatch
---
Site configuration information for perl 5.27.1​:

Configured by vpeil at Fri Jun 23 13​:48​:03 CEST 2017.

Summary of my perl5 (revision 5 version 27 subversion 1)
configuration​:
Derived from​: b964556
Platform​:
osname=linux
osvers=3.16.0-4-amd64
archname=x86_64-linux
uname='linux ubi 3.16.0-4-amd64 #1 smp debian 3.16.43-2
(2017-04-30) x86_64 gnulinux '
config_args='-des -Dusedevel'
hint=previous
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler​:
cc='cc'
ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.9.2'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries​:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking​:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Locally applied patches​:
uncommitted-changes

---
@​INC for perl 5.27.1​:
lib
/usr/local/lib/perl5/site_perl/5.27.1/x86_64-linux
/usr/local/lib/perl5/site_perl/5.27.1
/usr/local/lib/perl5/5.27.1/x86_64-linux
/usr/local/lib/perl5/5.27.1

---
Environment for perl 5.27.1​:
HOME=/home/vpeil
LANG=de_DE.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/vpeil/.plenv/shims​:/home/vpeil/.plenv/bin​:/usr/local/go/bin​:/usr/lib/dart/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games​:/usr/local/sbin​:/usr/sbin​:/sbin
PERL_BADLANG (unset)
SHELL=/bin/bash

--------------1.40.perlbug
Content-Type​: text/x-patch;
name="0001-add-test-descriptions-for-some-basic-tests.patch"
Content-Transfer-Encoding​: 8bit
Content-Disposition​: attachment;
filename="0001-add-test-descriptions-for-some-basic-tests.patch"

From 3fee568137415c16677c1c370f2f949540e66213 Mon Sep 17 00​:00​:00 2001
From​: Vitali Peil <vitali.peil@​uni-bielefeld.de>
Date​: Fri, 23 Jun 2017 13​:47​:53 +0200
Subject​: [PATCH] add test descriptions for some basic tests

---
AUTHORS | 1 +
t/base/cond.t | 16 ++++++++--------
t/base/if.t | 4 ++--
t/base/pat.t | 4 ++--
t/base/translate.t | 7 +++----
5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7fdb694..7b5d912 100644
--- a/AUTHORS
+++ b/AUTHORS
@​@​ -1250,6 +1250,7 @​@​ Victor Efimov <victor@​vsespb.ru>
Viktor Turskyi <koorchik@​gmail.com>
Ville Skyttä <scop@​cs132170.pp.htv.fi>
Vincent Pit <perl@​profvince.com>
+Vitali Peil <vitali.peil@​uni-bielefeld.de>
Vishal Bhatia <vishal@​deja.com>
Vlad Harchev <hvv@​hippo.ru>
Vladimir Alexiev <vladimir@​cs.ualberta.ca>
diff --git a/t/base/cond.t b/t/base/cond.t
index e2ef358..0b41fe0 100644
--- a/t/base/cond.t
+++ b/t/base/cond.t
@​@​ -6,12 +6,12 @​@​ print "1..4\n";

$x = '0';

-$x eq $x && (print "ok 1\n");
-$x ne $x && (print "not ok 1\n");
-$x eq $x || (print "not ok 2\n");
-$x ne $x || (print "ok 2\n");
+$x eq $x && (print "ok 1 - operator eq\n");
+$x ne $x && (print "not ok 1 - operator ne\n");
+$x eq $x || (print "not ok 2 - operator eq\n");
+$x ne $x || (print "ok 2 - operator ne\n");

-$x == $x && (print "ok 3\n");
-$x != $x && (print "not ok 3\n");
-$x == $x || (print "not ok 4\n");
-$x != $x || (print "ok 4\n");
+$x == $x && (print "ok 3 - operator ==\n");
+$x != $x && (print "not ok 3 - operator !=\n");
+$x == $x || (print "not ok 4 - operator ==\n");
+$x != $x || (print "ok 4 - operator !=\n");
diff --git a/t/base/if.t b/t/base/if.t
index f093b0d..be86d4c 100644
--- a/t/base/if.t
+++ b/t/base/if.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$x = 'test';
-if ($x eq $x) { print "ok 1\n"; } else { print "not ok 1\n";}
-if ($x ne $x) { print "not ok 2\n"; } else { print "ok 2\n";}
+if ($x eq $x) { print "ok 1 - if eq\n"; } else { print "not ok 1 - if
eq\n";}
+if ($x ne $x) { print "not ok 2 - if ne\n"; } else { print "ok 2 - if
ne\n";}
diff --git a/t/base/pat.t b/t/base/pat.t
index 9e3f615..2d02fa0 100644
--- a/t/base/pat.t
+++ b/t/base/pat.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$_ = 'test';
-if (/^test/) { print "ok 1\n"; } else { print "not ok 1\n";}
-if (/^foo/) { print "not ok 2\n"; } else { print "ok 2\n";}
+if (/^test/) { print "ok 1 - match regex\n"; } else { print "not ok 1
-
match regex\n";}
+if (/^foo/) { print "not ok 2 - match regex\n"; } else { print "ok 2
-
match regex\n";}
diff --git a/t/base/translate.t b/t/base/translate.t
index 614f22c..a25ae8e 100644
--- a/t/base/translate.t
+++ b/t/base/translate.t
@​@​ -1,7 +1,7 @​@​
#!./perl

# Verify round trip of translations from the native character set to
unicode
-# and back work. If this is wrong, nothing will be reliable.
+# and back work. If this is wrong, nothing will be reliable.

print "1..257\n"; # 0-255 plus one beyond

@​@​ -14,7 +14,7 @​@​ for my $i (0 .. 255) {
print "not ";
}
print "ok ";
- print $i + 1;
+ print $i + 1 . " - native_to_unicode $i";
print "\n";
}

@​@​ -23,5 +23,4 @​@​ for my $i (0 .. 255) {
if (utf8​::unicode_to_native(utf8​::native_to_unicode(100000)) !=
100000) {
print "not ";
}
-print "ok ";
-print "257\n";
+print "ok 257 - native_to_unicode of large number\n";

I'm attaching a patch which focuses on the tests for t/base/translate.t.

Karl, since you wrote that test file, can you review it and apply it if it's okay?

I'm not acting on the patches for the other three test files for reasons of history and sentiment rather than code. The three files in question are part of Larry Wall's very first commit to Perl in 1987. I am loathe to overwrite code for which 'git blame' still blames Larry. (See attachment.) If P5P wants to overrule me, I won't object -- but that requires a discussion.

Vitali, thanks for your efforts. There are plenty of other tests which lack descriptions for you (and anyone) to tackle.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jun 26, 2017

From @jkeenan

$ git blame t/base/cond.t | head -20
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 1) #!./perl
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 2)
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 3) # make sure conditional operators work
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 4)
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 5) print "1..4\n";
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 6)
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 7) $x = '0';
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 8)
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 9) $x eq $x && (print "ok 1\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 10) $x ne $x && (print "not ok 1\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 11) $x eq $x || (print "not ok 2\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 12) $x ne $x || (print "ok 2\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 13)
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 14) $x == $x && (print "ok 3\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 15) $x != $x && (print "not ok 3\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 16) $x == $x || (print "not ok 4\n");
^8d063cd t/base.cond (Larry Wall 1987-12-18 00​:00​:00 +0000 17) $x != $x || (print "ok 4\n");

@p5pRT
Copy link
Author

p5pRT commented Jun 26, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 29, 2017

From vitali.peil@uni-bielefeld.de

Am Mon, 26 Jun 2017 16​:15​:02 -0700, jkeenan schrieb​:

On Mon, 26 Jun 2017 06​:37​:37 GMT, vitali.peil@​uni-bielefeld.de wrote​:

This is a multi-part message in MIME format.
--------------1.40.perlbug
Content-Type​: text/plain; format=fixed
Content-Transfer-Encoding​: 8bit

This is a bug report for perl from vitali.peil@​uni-bielefeld.de,
generated with the help of perlbug 1.40 running under perl 5.27.1.

-----------------------------------------------------------------
[Please describe your issue here]

First of all​: this is my first perl patch.
The file Porting/todo.pod mentions missing test descriptions for
a bunch of tests. So, I've started working on this.

If it's appropriate I can add more of this in the future. If not,
please tell me what I can do better.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=utilities
severity=wishlist
Type=Patch
PatchStatus=HasPatch
---
Site configuration information for perl 5.27.1​:

Configured by vpeil at Fri Jun 23 13​:48​:03 CEST 2017.

Summary of my perl5 (revision 5 version 27 subversion 1)
configuration​:
Derived from​: b964556
Platform​:
osname=linux
osvers=3.16.0-4-amd64
archname=x86_64-linux
uname='linux ubi 3.16.0-4-amd64 #1 smp debian 3.16.43-2
(2017-04-30) x86_64 gnulinux '
config_args='-des -Dusedevel'
hint=previous
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler​:
cc='cc'
ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.9.2'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries​:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking​:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-
strong'

Locally applied patches​:
uncommitted-changes

---
@​INC for perl 5.27.1​:
lib
/usr/local/lib/perl5/site_perl/5.27.1/x86_64-linux
/usr/local/lib/perl5/site_perl/5.27.1
/usr/local/lib/perl5/5.27.1/x86_64-linux
/usr/local/lib/perl5/5.27.1

---
Environment for perl 5.27.1​:
HOME=/home/vpeil
LANG=de_DE.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/vpeil/.plenv/shims​:/home/vpeil/.plenv/bin​:/usr/local/go/bin​:/usr/lib/dart/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games​:/usr/local/sbin​:/usr/sbin​:/sbin
PERL_BADLANG (unset)
SHELL=/bin/bash

--------------1.40.perlbug
Content-Type​: text/x-patch;
name="0001-add-test-descriptions-for-some-basic-tests.patch"
Content-Transfer-Encoding​: 8bit
Content-Disposition​: attachment;
filename="0001-add-test-descriptions-for-some-basic-tests.patch"

From 3fee568137415c16677c1c370f2f949540e66213 Mon Sep 17 00​:00​:00
2001
From​: Vitali Peil <vitali.peil@​uni-bielefeld.de>
Date​: Fri, 23 Jun 2017 13​:47​:53 +0200
Subject​: [PATCH] add test descriptions for some basic tests

---
AUTHORS | 1 +
t/base/cond.t | 16 ++++++++--------
t/base/if.t | 4 ++--
t/base/pat.t | 4 ++--
t/base/translate.t | 7 +++----
5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7fdb694..7b5d912 100644
--- a/AUTHORS
+++ b/AUTHORS
@​@​ -1250,6 +1250,7 @​@​ Victor Efimov <victor@​vsespb.ru>
Viktor Turskyi <koorchik@​gmail.com>
Ville Skyttä <scop@​cs132170.pp.htv.fi>
Vincent Pit <perl@​profvince.com>
+Vitali Peil <vitali.peil@​uni-bielefeld.de>
Vishal Bhatia <vishal@​deja.com>
Vlad Harchev <hvv@​hippo.ru>
Vladimir Alexiev <vladimir@​cs.ualberta.ca>
diff --git a/t/base/cond.t b/t/base/cond.t
index e2ef358..0b41fe0 100644
--- a/t/base/cond.t
+++ b/t/base/cond.t
@​@​ -6,12 +6,12 @​@​ print "1..4\n";

$x = '0';

-$x eq $x && (print "ok 1\n");
-$x ne $x && (print "not ok 1\n");
-$x eq $x || (print "not ok 2\n");
-$x ne $x || (print "ok 2\n");
+$x eq $x && (print "ok 1 - operator eq\n");
+$x ne $x && (print "not ok 1 - operator ne\n");
+$x eq $x || (print "not ok 2 - operator eq\n");
+$x ne $x || (print "ok 2 - operator ne\n");

-$x == $x && (print "ok 3\n");
-$x != $x && (print "not ok 3\n");
-$x == $x || (print "not ok 4\n");
-$x != $x || (print "ok 4\n");
+$x == $x && (print "ok 3 - operator ==\n");
+$x != $x && (print "not ok 3 - operator !=\n");
+$x == $x || (print "not ok 4 - operator ==\n");
+$x != $x || (print "ok 4 - operator !=\n");
diff --git a/t/base/if.t b/t/base/if.t
index f093b0d..be86d4c 100644
--- a/t/base/if.t
+++ b/t/base/if.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$x = 'test';
-if ($x eq $x) { print "ok 1\n"; } else { print "not ok 1\n";}
-if ($x ne $x) { print "not ok 2\n"; } else { print "ok 2\n";}
+if ($x eq $x) { print "ok 1 - if eq\n"; } else { print "not ok 1 -
if
eq\n";}
+if ($x ne $x) { print "not ok 2 - if ne\n"; } else { print "ok 2 -
if
ne\n";}
diff --git a/t/base/pat.t b/t/base/pat.t
index 9e3f615..2d02fa0 100644
--- a/t/base/pat.t
+++ b/t/base/pat.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$_ = 'test';
-if (/^test/) { print "ok 1\n"; } else { print "not ok 1\n";}
-if (/^foo/) { print "not ok 2\n"; } else { print "ok 2\n";}
+if (/^test/) { print "ok 1 - match regex\n"; } else { print "not ok
1
-
match regex\n";}
+if (/^foo/) { print "not ok 2 - match regex\n"; } else { print "ok 2
-
match regex\n";}
diff --git a/t/base/translate.t b/t/base/translate.t
index 614f22c..a25ae8e 100644
--- a/t/base/translate.t
+++ b/t/base/translate.t
@​@​ -1,7 +1,7 @​@​
#!./perl

# Verify round trip of translations from the native character set to
unicode
-# and back work. If this is wrong, nothing will be reliable.
+# and back work. If this is wrong, nothing will be reliable.

print "1..257\n"; # 0-255 plus one beyond

@​@​ -14,7 +14,7 @​@​ for my $i (0 .. 255) {
print "not ";
}
print "ok ";
- print $i + 1;
+ print $i + 1 . " - native_to_unicode $i";
print "\n";
}

@​@​ -23,5 +23,4 @​@​ for my $i (0 .. 255) {
if (utf8​::unicode_to_native(utf8​::native_to_unicode(100000)) !=
100000) {
print "not ";
}
-print "ok ";
-print "257\n";
+print "ok 257 - native_to_unicode of large number\n";

I'm attaching a patch which focuses on the tests for
t/base/translate.t.

Karl, since you wrote that test file, can you review it and apply it
if it's okay?

I'm not acting on the patches for the other three test files for
reasons of history and sentiment rather than code. The three files in
question are part of Larry Wall's very first commit to Perl in 1987.
I am loathe to overwrite code for which 'git blame' still blames
Larry. (See attachment.) If P5P wants to overrule me, I won't object
-- but that requires a discussion.

Vitali, thanks for your efforts. There are plenty of other tests
which lack descriptions for you (and anyone) to tackle.

Thank you very much.

Hi,

I wasn't aware of the fact (Larry's first commit).
For historical reasons I would not change
this (and keep these files as a fun fact)

So I will do some work on other test files...
Feel free to close this RT.

@p5pRT
Copy link
Author

p5pRT commented Jun 29, 2017

From @jkeenan

On Thu, 29 Jun 2017 10​:42​:00 GMT, vitali.peil@​uni-bielefeld.de wrote​:

Am Mon, 26 Jun 2017 16​:15​:02 -0700, jkeenan schrieb​:

I'm not acting on the patches for the other three test files for
reasons of history and sentiment rather than code. The three files
in
question are part of Larry Wall's very first commit to Perl in 1987.
I am loathe to overwrite code for which 'git blame' still blames
Larry. (See attachment.) If P5P wants to overrule me, I won't object
-- but that requires a discussion.

Vitali, thanks for your efforts. There are plenty of other tests
which lack descriptions for you (and anyone) to tackle.

Thank you very much.

Hi,

I wasn't aware of the fact (Larry's first commit).
For historical reasons I would not change
this (and keep these files as a fun fact)

So I will do some work on other test files...
Feel free to close this RT.

We're still reviewing your patches for the 4th file, so the ticket is still open.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2017

From @iabyn

On Mon, Jun 26, 2017 at 04​:15​:03PM -0700, James E Keenan via RT wrote​:

I'm not acting on the patches for the other three test files for reasons
of history and sentiment rather than code. The three files in question
are part of Larry Wall's very first commit to Perl in 1987. I am loathe
to overwrite code for which 'git blame' still blames Larry. (See
attachment.) If P5P wants to overrule me, I won't object -- but that
requires a discussion.

I don't think sentimentality is a good reason not to apply patches which
improve the usability of test files.

--
Never work with children, animals, or actors.

@p5pRT
Copy link
Author

p5pRT commented Jul 5, 2017

From @jkeenan

On Thu, 29 Jun 2017 10​:42​:00 GMT, vitali.peil@​uni-bielefeld.de wrote​:

Am Mon, 26 Jun 2017 16​:15​:02 -0700, jkeenan schrieb​:

On Mon, 26 Jun 2017 06​:37​:37 GMT, vitali.peil@​uni-bielefeld.de wrote​:

This is a multi-part message in MIME format.
--------------1.40.perlbug
Content-Type​: text/plain; format=fixed
Content-Transfer-Encoding​: 8bit

This is a bug report for perl from vitali.peil@​uni-bielefeld.de,
generated with the help of perlbug 1.40 running under perl 5.27.1.

-----------------------------------------------------------------
[Please describe your issue here]

First of all​: this is my first perl patch.
The file Porting/todo.pod mentions missing test descriptions for
a bunch of tests. So, I've started working on this.

If it's appropriate I can add more of this in the future. If not,
please tell me what I can do better.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=utilities
severity=wishlist
Type=Patch
PatchStatus=HasPatch
---
Site configuration information for perl 5.27.1​:

Configured by vpeil at Fri Jun 23 13​:48​:03 CEST 2017.

Summary of my perl5 (revision 5 version 27 subversion 1)
configuration​:
Derived from​: b964556
Platform​:
osname=linux
osvers=3.16.0-4-amd64
archname=x86_64-linux
uname='linux ubi 3.16.0-4-amd64 #1 smp debian 3.16.43-2
(2017-04-30) x86_64 gnulinux '
config_args='-des -Dusedevel'
hint=previous
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler​:
cc='cc'
ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.9.2'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries​:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking​:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-
strong'

Locally applied patches​:
uncommitted-changes

---
@​INC for perl 5.27.1​:
lib
/usr/local/lib/perl5/site_perl/5.27.1/x86_64-linux
/usr/local/lib/perl5/site_perl/5.27.1
/usr/local/lib/perl5/5.27.1/x86_64-linux
/usr/local/lib/perl5/5.27.1

---
Environment for perl 5.27.1​:
HOME=/home/vpeil
LANG=de_DE.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/vpeil/.plenv/shims​:/home/vpeil/.plenv/bin​:/usr/local/go/bin​:/usr/lib/dart/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games​:/usr/local/sbin​:/usr/sbin​:/sbin
PERL_BADLANG (unset)
SHELL=/bin/bash

--------------1.40.perlbug
Content-Type​: text/x-patch;
name="0001-add-test-descriptions-for-some-basic-tests.patch"
Content-Transfer-Encoding​: 8bit
Content-Disposition​: attachment;
filename="0001-add-test-descriptions-for-some-basic-tests.patch"

From 3fee568137415c16677c1c370f2f949540e66213 Mon Sep 17 00​:00​:00
2001
From​: Vitali Peil <vitali.peil@​uni-bielefeld.de>
Date​: Fri, 23 Jun 2017 13​:47​:53 +0200
Subject​: [PATCH] add test descriptions for some basic tests

---
AUTHORS | 1 +
t/base/cond.t | 16 ++++++++--------
t/base/if.t | 4 ++--
t/base/pat.t | 4 ++--
t/base/translate.t | 7 +++----
5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7fdb694..7b5d912 100644
--- a/AUTHORS
+++ b/AUTHORS
@​@​ -1250,6 +1250,7 @​@​ Victor Efimov <victor@​vsespb.ru>
Viktor Turskyi <koorchik@​gmail.com>
Ville Skyttä <scop@​cs132170.pp.htv.fi>
Vincent Pit <perl@​profvince.com>
+Vitali Peil <vitali.peil@​uni-bielefeld.de>
Vishal Bhatia <vishal@​deja.com>
Vlad Harchev <hvv@​hippo.ru>
Vladimir Alexiev <vladimir@​cs.ualberta.ca>
diff --git a/t/base/cond.t b/t/base/cond.t
index e2ef358..0b41fe0 100644
--- a/t/base/cond.t
+++ b/t/base/cond.t
@​@​ -6,12 +6,12 @​@​ print "1..4\n";

$x = '0';

-$x eq $x && (print "ok 1\n");
-$x ne $x && (print "not ok 1\n");
-$x eq $x || (print "not ok 2\n");
-$x ne $x || (print "ok 2\n");
+$x eq $x && (print "ok 1 - operator eq\n");
+$x ne $x && (print "not ok 1 - operator ne\n");
+$x eq $x || (print "not ok 2 - operator eq\n");
+$x ne $x || (print "ok 2 - operator ne\n");

-$x == $x && (print "ok 3\n");
-$x != $x && (print "not ok 3\n");
-$x == $x || (print "not ok 4\n");
-$x != $x || (print "ok 4\n");
+$x == $x && (print "ok 3 - operator ==\n");
+$x != $x && (print "not ok 3 - operator !=\n");
+$x == $x || (print "not ok 4 - operator ==\n");
+$x != $x || (print "ok 4 - operator !=\n");
diff --git a/t/base/if.t b/t/base/if.t
index f093b0d..be86d4c 100644
--- a/t/base/if.t
+++ b/t/base/if.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$x = 'test';
-if ($x eq $x) { print "ok 1\n"; } else { print "not ok 1\n";}
-if ($x ne $x) { print "not ok 2\n"; } else { print "ok 2\n";}
+if ($x eq $x) { print "ok 1 - if eq\n"; } else { print "not ok 1 -
if
eq\n";}
+if ($x ne $x) { print "not ok 2 - if ne\n"; } else { print "ok 2 -
if
ne\n";}
diff --git a/t/base/pat.t b/t/base/pat.t
index 9e3f615..2d02fa0 100644
--- a/t/base/pat.t
+++ b/t/base/pat.t
@​@​ -5,5 +5,5 @​@​ print "1..2\n";
# first test to see if we can run the tests.

$_ = 'test';
-if (/^test/) { print "ok 1\n"; } else { print "not ok 1\n";}
-if (/^foo/) { print "not ok 2\n"; } else { print "ok 2\n";}
+if (/^test/) { print "ok 1 - match regex\n"; } else { print "not
ok
1
-
match regex\n";}
+if (/^foo/) { print "not ok 2 - match regex\n"; } else { print "ok
2
-
match regex\n";}
diff --git a/t/base/translate.t b/t/base/translate.t
index 614f22c..a25ae8e 100644
--- a/t/base/translate.t
+++ b/t/base/translate.t
@​@​ -1,7 +1,7 @​@​
#!./perl

# Verify round trip of translations from the native character set
to
unicode
-# and back work. If this is wrong, nothing will be reliable.
+# and back work. If this is wrong, nothing will be reliable.

print "1..257\n"; # 0-255 plus one beyond

@​@​ -14,7 +14,7 @​@​ for my $i (0 .. 255) {
print "not ";
}
print "ok ";
- print $i + 1;
+ print $i + 1 . " - native_to_unicode $i";
print "\n";
}

@​@​ -23,5 +23,4 @​@​ for my $i (0 .. 255) {
if (utf8​::unicode_to_native(utf8​::native_to_unicode(100000)) !=
100000) {
print "not ";
}
-print "ok ";
-print "257\n";
+print "ok 257 - native_to_unicode of large number\n";

I'm attaching a patch which focuses on the tests for
t/base/translate.t.

Karl, since you wrote that test file, can you review it and apply it
if it's okay?

I'm not acting on the patches for the other three test files for
reasons of history and sentiment rather than code. The three files
in
question are part of Larry Wall's very first commit to Perl in 1987.
I am loathe to overwrite code for which 'git blame' still blames
Larry. (See attachment.) If P5P wants to overrule me, I won't object
-- but that requires a discussion.

Vitali, thanks for your efforts. There are plenty of other tests
which lack descriptions for you (and anyone) to tackle.

Thank you very much.

Hi,

I wasn't aware of the fact (Larry's first commit).
For historical reasons I would not change
this (and keep these files as a fun fact)

So I will do some work on other test files...
Feel free to close this RT.

Patches to one file applied in commit 8abe6e1.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2017

From vitali.peil@uni-bielefeld.de

Am 03.07.2017 um 09​:45 schrieb Dave Mitchell via RT​:

On Mon, Jun 26, 2017 at 04​:15​:03PM -0700, James E Keenan via RT wrote​:

I'm not acting on the patches for the other three test files for reasons
of history and sentiment rather than code. The three files in question
are part of Larry Wall's very first commit to Perl in 1987. I am loathe
to overwrite code for which 'git blame' still blames Larry. (See
attachment.) If P5P wants to overrule me, I won't object -- but that
requires a discussion.
I don't think sentimentality is a good reason not to apply patches which
improve the usability of test files.

If we agree that sentimentality is no reason, I would submit more
patches on that.

--
Vitali Peil
Deputy Head Acquisitions Department
Subject Librarian
Office U3-200/E1-144, Tel. +49521-106-4010/6125
Bielefeld University Library

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2017

From @xsawyerx

On 10/04/2017 11​:53 AM, Vitali Peil wrote​:

Am 03.07.2017 um 09​:45 schrieb Dave Mitchell via RT​:

On Mon, Jun 26, 2017 at 04​:15​:03PM -0700, James E Keenan via RT wrote​:

I'm not acting on the patches for the other three test files for reasons
of history and sentiment rather than code. The three files in question
are part of Larry Wall's very first commit to Perl in 1987. I am loathe
to overwrite code for which 'git blame' still blames Larry. (See
attachment.) If P5P wants to overrule me, I won't object -- but that
requires a discussion.
I don't think sentimentality is a good reason not to apply patches which
improve the usability of test files.

If we agree that sentimentality is no reason, I would submit more
patches on that.

One possibly higher goal here, which might deserve consideration, is
moving tests to a proper framework.

From Porting/todo.pod​:

    Migrate t/ from custom TAP generation

      Many tests below t/ still generate TAP by "hand", rather than using
      library functions. As explained in "TESTING" in perlhack, tests
  in t/ are
      written in a particular way to test that more complex constructions
      actually work before using them routinely. Hence they don't use
      "Test​::More", but instead there is an intentionally simpler library,
      t/test.pl. However, quite a few tests in t/ have not been
  refactored to
      use it. Refactoring any of these tests, one at a time, is a
  useful thing
      TODO.

      The subdirectories base, cmd, comp and opbasic, that contain the
  most
      basic tests, should be excluded from this task.

Would you fancy such work as part of your effort to improve our testing?

@toddr toddr removed the khw label Oct 25, 2019
khwilliamson pushed a commit that referenced this issue Nov 26, 2019
Committer's note:  I'm belatedly applying the rest of the patches from
the original ticket.
@khwilliamson
Copy link
Contributor

I applied the remainder of this patch in 8a283e0

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants