diff options
author | sisyphus <sisyphus@cpan.org> | 2020-10-21 10:52:11 +1100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 12:09:06 -0700 |
commit | cfc95b5630c63927ab68bb4cdc08b1dec23c5569 (patch) | |
tree | 13269904c0493963de80c60cfbd6a1a573087ce9 /Configure | |
parent | ec8faddea92f3f0c23233b57a34f11b94391762f (diff) | |
download | perl-cfc95b5630c63927ab68bb4cdc08b1dec23c5569.tar.gz |
Configure - test that gcvt/qgcvt are not buggy (Issue 18170)
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -10374,6 +10374,15 @@ void checkit(const char *expect, char *got) } } +void lencheck(int expect, int got) +{ + if (expect != got) { + printf("%s length mismatch: Expected %d, got %d\n", + myname, expect, got); + exit(1); + } +} + int main() { char buf[64]; @@ -10446,6 +10455,12 @@ int main() else checkit("1e+34", buf); + /* Test for an Ubuntu/Debian bug in gcvt and qgcvt. See: * + * https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1899553 */ + + Gconvert((DOUBLETYPE)0.4, 53, 0, buf); + lencheck(55, (int)strlen(buf)); + /* For Perl, if you add additional tests here, also add them to * t/base/num.t for benefit of platforms not using Configure or * overriding d_Gconvert */ |