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

Fix typos in 2 test files #16647

Closed
p5pRT opened this issue Jul 31, 2018 · 17 comments
Closed

Fix typos in 2 test files #16647

p5pRT opened this issue Jul 31, 2018 · 17 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 31, 2018

Migrated from rt.perl.org#133417 (status was 'resolved')

Searchable as RT133417$

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2018

From @sisyphus

Hi,
Typos in ext/POSIX/t/posix.t and t/run/locale.t were picked up by aitap -
see https://www.perlmonks.org/?node_id=1219428.

Patches are attached.

Cheers,
Rob

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2018

From @sisyphus

0001-posix_t.patch
From d766b5d3b28eb2c51874c881271d6e41f8f7854a Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Tue, 31 Jul 2018 19:14:12 +1000
Subject: [PATCH 1/2] posix_t

---
 ext/POSIX/t/posix.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 1b2dd40..e33e047 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -181,7 +181,7 @@ SKIP: {
     }
 
     # we're just checking that strtold works, not how accurate it is
-    ($n, $x) = &POSIX::strtod('2.718_ISH');
+    ($n, $x) = &POSIX::strtold('2.718_ISH');
     cmp_ok(abs("2.718" - $n), '<', 1e-6, 'strtold works');
     is($x, 4, 'strtold works');
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2018

From @sisyphus

0002-run_locale_t.patch
From 4b6055771db9efc12cdb282cdd8f77492f93ca33 Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Tue, 31 Jul 2018 19:14:49 +1000
Subject: [PATCH 2/2] run_locale_t

---
 t/run/locale.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/run/locale.t b/t/run/locale.t
index 282fbb5..ae5abca 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -438,6 +438,7 @@ EOF
 EOF
                 "1,5\n2,5", { stderr => 'devnull' }, "Can do math when radix is a comma"); # [perl 115800]
 
+          SKIP: {
             unless ($have_strtod) {
                 skip("no strtod()", 1);
             }
@@ -451,6 +452,7 @@ EOF
 EOF
                 "1.5", { stderr => 'devnull' }, "POSIX::strtod() uses underlying locale");
             }
+          }
         }
     }
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2018

From @tonycoz

On Tue, 31 Jul 2018 02​:28​:55 -0700, sisyphus359@​gmail.com wrote​:

Hi,
Typos in ext/POSIX/t/posix.t and t/run/locale.t were picked up by aitap -
see https://www.perlmonks.org/?node_id=1219428.

Patches are attached.

Is there any chance you could supply patches with better commit messages?

Otherwise I can edit the commit messages before pushing them.

Tony

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2018

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

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2018

From @sisyphus

On Tue, 31 Jul 2018 22​:56​:57 -0700, tonyc wrote​:

Is there any chance you could supply patches with better commit messages?

Sure.
I didn't realize the full significance of the commit message. (There's a lot about git that I don't know.)

I hope the attached are satisfactory.

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2018

From @sisyphus

0001-t-run-locale.t-Add-missing-SKIP-block-around-the-POS.patch
From 44e74a0043bb7da69369c1fc0bb7f94d0449ddd6 Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Wed, 1 Aug 2018 19:08:40 +1000
Subject: [PATCH 1/2] t/run/locale.t - Add missing SKIP:{} block around the
 "POSIX::strtod() uses underlying locale" test

---
 t/run/locale.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/run/locale.t b/t/run/locale.t
index 282fbb5..ae5abca 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -438,6 +438,7 @@ EOF
 EOF
                 "1,5\n2,5", { stderr => 'devnull' }, "Can do math when radix is a comma"); # [perl 115800]
 
+          SKIP: {
             unless ($have_strtod) {
                 skip("no strtod()", 1);
             }
@@ -451,6 +452,7 @@ EOF
 EOF
                 "1.5", { stderr => 'devnull' }, "POSIX::strtod() uses underlying locale");
             }
+          }
         }
     }
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2018

From @sisyphus

0002-ext-POSIX-t-posix.t-Replace-POSIX-strtod-with-POSIX-.patch
From e8e8165cd9f991ab40aed254a4c31587335fa9e3 Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Wed, 1 Aug 2018 19:13:08 +1000
Subject: [PATCH 2/2] ext/POSIX/t/posix.t - Replace "&POSIX::strtod" with
 "&POSIX::strtold" in "strtold works" test

---
 ext/POSIX/t/posix.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 1b2dd40..e33e047 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -181,7 +181,7 @@ SKIP: {
     }
 
     # we're just checking that strtold works, not how accurate it is
-    ($n, $x) = &POSIX::strtod('2.718_ISH');
+    ($n, $x) = &POSIX::strtold('2.718_ISH');
     cmp_ok(abs("2.718" - $n), '<', 1e-6, 'strtold works');
     is($x, 4, 'strtold works');
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @tonycoz

On Wed, 01 Aug 2018 02​:19​:17 -0700, sisyphus@​cpan.org wrote​:

On Tue, 31 Jul 2018 22​:56​:57 -0700, tonyc wrote​:

Is there any chance you could supply patches with better commit
messages?

Sure.
I didn't realize the full significance of the commit message. (There's
a lot about git that I don't know.)

I hope the attached are satisfactory.

From perlhack.pod​:

The first line of the commit message should be a short description
without a period. It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
only display the first line (cut off at 50 characters) when presenting
commit summaries.

The commit message should include a description of the problem that the
patch corrects or new functionality that the patch adds.

As a general rule of thumb, your commit message should help a
programmer who knows the Perl core quickly understand what you were
trying to do, how you were trying to do it, and why the change matters
to Perl.
<<

so shorter first lines would be useful.

Tony

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

I can't connect to most of the internet (including rt.perl.org) at the
moment, so I'll try posting these new patches via gmail.
(The only difference between these and earlier ones should be the commit
message).

Cheers,
Rob

On Thu, Aug 2, 2018 at 10​:39 AM, Tony Cook via RT <perlbug-followup@​perl.org

wrote​:

On Wed, 01 Aug 2018 02​:19​:17 -0700, sisyphus@​cpan.org wrote​:

On Tue, 31 Jul 2018 22​:56​:57 -0700, tonyc wrote​:

Is there any chance you could supply patches with better commit
messages?

Sure.
I didn't realize the full significance of the commit message. (There's
a lot about git that I don't know.)

I hope the attached are satisfactory.

From perlhack.pod​:

The first line of the commit message should be a short description
without a period. It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
only display the first line (cut off at 50 characters) when presenting
commit summaries.

The commit message should include a description of the problem that the
patch corrects or new functionality that the patch adds.

As a general rule of thumb, your commit message should help a
programmer who knows the Perl core quickly understand what you were
trying to do, how you were trying to do it, and why the change matters
to Perl.
<<

so shorter first lines would be useful.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133417

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

0001-t-run-locale.t-Add-missing-SKIP-block.patch
From 9f5739df191a1082cf8e2ea239839ce43851e05a Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Thu, 2 Aug 2018 17:55:44 +1000
Subject: [PATCH 1/2] t/run/locale.t - Add missing SKIP:{} block

---
 t/run/locale.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/run/locale.t b/t/run/locale.t
index 282fbb5..ae5abca 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -438,6 +438,7 @@ EOF
 EOF
                 "1,5\n2,5", { stderr => 'devnull' }, "Can do math when radix is a comma"); # [perl 115800]
 
+          SKIP: {
             unless ($have_strtod) {
                 skip("no strtod()", 1);
             }
@@ -451,6 +452,7 @@ EOF
 EOF
                 "1.5", { stderr => 'devnull' }, "POSIX::strtod() uses underlying locale");
             }
+          }
         }
     }
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

0002-ext-POSIX-t-posix.t-Fix-strtold-works-test.patch
From f234d77bfa9a1789e4a82f3b47e7ef7e861bde21 Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Thu, 2 Aug 2018 17:59:50 +1000
Subject: [PATCH 2/2] ext/POSIX/t/posix.t - Fix 'strtold works' test

---
 ext/POSIX/t/posix.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 1b2dd40..e33e047 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -181,7 +181,7 @@ SKIP: {
     }
 
     # we're just checking that strtold works, not how accurate it is
-    ($n, $x) = &POSIX::strtod('2.718_ISH');
+    ($n, $x) = &POSIX::strtold('2.718_ISH');
     cmp_ok(abs("2.718" - $n), '<', 1e-6, 'strtold works');
     is($x, 4, 'strtold works');
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

I can't connect to most of the internet (including rt.perl.org) at the
moment, so I'll try posting these new patches via gmail.
(The only difference between these and earlier ones should be the commit
message).

Cheers,
Rob

On Thu, Aug 2, 2018 at 10​:39 AM, Tony Cook via RT <perlbug-followup@​perl.org

wrote​:

On Wed, 01 Aug 2018 02​:19​:17 -0700, sisyphus@​cpan.org wrote​:

On Tue, 31 Jul 2018 22​:56​:57 -0700, tonyc wrote​:

Is there any chance you could supply patches with better commit
messages?

Sure.
I didn't realize the full significance of the commit message. (There's
a lot about git that I don't know.)

I hope the attached are satisfactory.

From perlhack.pod​:

The first line of the commit message should be a short description
without a period. It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
only display the first line (cut off at 50 characters) when presenting
commit summaries.

The commit message should include a description of the problem that the
patch corrects or new functionality that the patch adds.

As a general rule of thumb, your commit message should help a
programmer who knows the Perl core quickly understand what you were
trying to do, how you were trying to do it, and why the change matters
to Perl.
<<

so shorter first lines would be useful.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133417

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

0001-t-run-locale.t-Add-missing-SKIP-block.patch
From 9f5739df191a1082cf8e2ea239839ce43851e05a Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Thu, 2 Aug 2018 17:55:44 +1000
Subject: [PATCH 1/2] t/run/locale.t - Add missing SKIP:{} block

---
 t/run/locale.t | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/run/locale.t b/t/run/locale.t
index 282fbb5..ae5abca 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -438,6 +438,7 @@ EOF
 EOF
                 "1,5\n2,5", { stderr => 'devnull' }, "Can do math when radix is a comma"); # [perl 115800]
 
+          SKIP: {
             unless ($have_strtod) {
                 skip("no strtod()", 1);
             }
@@ -451,6 +452,7 @@ EOF
 EOF
                 "1.5", { stderr => 'devnull' }, "POSIX::strtod() uses underlying locale");
             }
+          }
         }
     }
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @sisyphus

0002-ext-POSIX-t-posix.t-Fix-strtold-works-test.patch
From f234d77bfa9a1789e4a82f3b47e7ef7e861bde21 Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus1@optusnet.com.au>
Date: Thu, 2 Aug 2018 17:59:50 +1000
Subject: [PATCH 2/2] ext/POSIX/t/posix.t - Fix 'strtold works' test

---
 ext/POSIX/t/posix.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 1b2dd40..e33e047 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -181,7 +181,7 @@ SKIP: {
     }
 
     # we're just checking that strtold works, not how accurate it is
-    ($n, $x) = &POSIX::strtod('2.718_ISH');
+    ($n, $x) = &POSIX::strtold('2.718_ISH');
     cmp_ok(abs("2.718" - $n), '<', 1e-6, 'strtold works');
     is($x, 4, 'strtold works');
 
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

From @jkeenan

On Thu, 02 Aug 2018 08​:09​:31 GMT, sisyphus359@​gmail.com wrote​:

I can't connect to most of the internet (including rt.perl.org) at the
moment, so I'll try posting these new patches via gmail.
(The only difference between these and earlier ones should be the commit
message).

Cheers,
Rob

On Thu, Aug 2, 2018 at 10​:39 AM, Tony Cook via RT <perlbug-followup@​perl.org

wrote​:

On Wed, 01 Aug 2018 02​:19​:17 -0700, sisyphus@​cpan.org wrote​:

On Tue, 31 Jul 2018 22​:56​:57 -0700, tonyc wrote​:

Is there any chance you could supply patches with better commit
messages?

Sure.
I didn't realize the full significance of the commit message. (There's
a lot about git that I don't know.)

I hope the attached are satisfactory.

From perlhack.pod​:

The first line of the commit message should be a short description
without a period. It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
only display the first line (cut off at 50 characters) when presenting
commit summaries.

The commit message should include a description of the problem that the
patch corrects or new functionality that the patch adds.

As a general rule of thumb, your commit message should help a
programmer who knows the Perl core quickly understand what you were
trying to do, how you were trying to do it, and why the change matters
to Perl.
<<

so shorter first lines would be useful.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133417

Thanks. Applied to blead in commit c4fe5c4
and commit e8f2a01.

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

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2018

@jkeenan - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant