In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/3ee45b3fd72ecaa02e3aa6aa1fe48554cc8acd4c?hp=aed13ba6ad26e9b0202672c78a56fd2d9cc4f40a>
- Log ----------------------------------------------------------------- commit 3ee45b3fd72ecaa02e3aa6aa1fe48554cc8acd4c Merge: aed13ba 971ab96 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 20:12:31 2014 -0700 [Merge] minitest fixes If miniperl is sufficiently broken that make_ext.pl canât run, itâs useful to run minitest and debug the individual tests to find out what is broken. I was doing just that and ran into one false positive after another, which greatly reduces the usefulness of minitest. This branch fixes up the tests to make sure miniperl can find the nec- essary modules, skipping tests where that is not possible. test.pl has two new functions: - set_up_inc, which clobbers @INC under real perl, but unshifts under miniperl - skip_all_without_unicode_tables, which skips the whole test script if Unicode tables have not been built yet, but only under miniperl; real perl is not allowed to skip the tests because of that, since the absence of Unicode tables indicates a broken perl. commit 971ab96b37457c9d747cc3d888f2ac2430f0d18d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:41:38 2014 -0700 Skip t/uni/variables.t in absence of Unicode tables If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before the Unicode tables are built. As of 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/uni/variables.t commit cb4e26284e0b5007afdb90a6cd8bdacfa27d349c Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:41:00 2014 -0700 Get t/uni/universal.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before base.pm is copied into lib/. M t/uni/universal.t commit d8e927e48c57b7d43c18af185a6daadc21e8038c Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:40:19 2014 -0700 Get t/uni/stash.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/stash.t commit de9a15d1ce0882b417b2f1d7b49f1ef2429e30cf Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:39:39 2014 -0700 Get t/uni/readline.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/readline.t commit 41779348d6434ee92d671d28cc074a69576782b1 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:38:54 2014 -0700 Skip t/uni/parser.t in absence of Unicode tables If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before the Unicode tables are built. As of 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/uni/parser.t commit 4fa35c333a679ee2f1d5a774e12b4cee2ce7b22c Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:34:46 2014 -0700 Get t/uni/opcroak.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before fields.pm is copied into lib/. M t/uni/opcroak.t commit 98739cd34d82855ef3b000babd7dfb8145639bc6 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:32:49 2014 -0700 t/uni/opcroak.t: Die if eval fails This will give better diagnostics instead of failing silently if fields.pm cannot load for whatever reason. M t/uni/opcroak.t commit 61d6c3429770413b77af78cbfbe8244a25a04d85 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:30:15 2014 -0700 Get t/uni/method.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before parent.pm is copied into lib/. M t/uni/method.t commit 5820e6f9b2ebd7065286ae8381ec75b6e8aab51f Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:28:24 2014 -0700 Really get t/uni/ case tests working under miniperl The earlier commits on this branch to fix up lower.t, upper.t and title.t script under minitest were written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of failing silently. So skip the tests if tables have not been built yet. M t/uni/case.pl commit c8191e192267f85bc25e6d4758e5c4344c984ffd Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 11:26:02 2014 -0700 Move @INC setup to t/uni/case.pl M t/uni/case.pl M t/uni/lower.t M t/uni/title.t M t/uni/upper.t commit 2b08d1e271a66b75d93ee0a86284c36a21036e57 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 09:33:54 2014 -0700 skip_all_without_unicode_tables M t/op/lc.t M t/re/pat.t M t/re/reg_mesg.t M t/re/regex_sets.t M t/test.pl M t/uni/cache.t M t/uni/class.t M t/uni/fold.t M t/uni/gv.t M t/uni/labels.t commit 43ece5b1252b7eff2edb7ddd890597973f68a388 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 08:36:04 2014 -0700 Put miniperl @INC logic in test.pl M t/op/avhv.t M t/op/blocks.t M t/op/closure.t M t/op/eval.t M t/op/filetest.t M t/op/gv.t M t/op/hash.t M t/op/inccode.t M t/op/index.t M t/op/kvaslice.t M t/op/kvhslice.t M t/op/lc.t M t/op/length.t M t/op/lexsub.t M t/op/my_stash.t M t/op/override.t M t/op/pack.t M t/op/push.t M t/op/readline.t M t/op/reverse.t M t/op/smartkve.t M t/op/smartmatch.t M t/op/sort.t M t/op/split.t M t/op/sub.t M t/op/substr.t M t/op/taint.t M t/op/tie_fetch_count.t M t/op/tiehandle.t M t/op/tr.t M t/op/universal.t M t/op/utftaint.t M t/op/vec.t M t/op/warn.t M t/op/write.t M t/re/pat_re_eval.t M t/re/reg_eval_scope.t M t/re/rxcode.t M t/re/subst.t M t/test.pl M t/uni/cache.t M t/uni/class.t M t/uni/fold.t M t/uni/gv.t M t/uni/labels.t M t/uni/lower.t M t/uni/title.t M t/uni/upper.t commit 681e6b63a3b960bd94f8f54f9fc7fa36ad63fff7 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 02:04:12 2014 -0700 Really get t/uni/labels.t working under miniperl The earlier commit on this branch to fix up this script under mini- test was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of fail- ing silently. M t/uni/labels.t commit 17a3fac2d0576d87877fdef9bc9fba75d175efc5 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 02:03:17 2014 -0700 Really get t/uni/gv.t working under miniperl The earlier commit on this branch to fix up this script under mini- test was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of fail- ing silently. M t/uni/gv.t commit 1f0b26967c95db7e32b79f10deae25da1852a092 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 02:02:29 2014 -0700 Really get t/uni/fold.t working under miniperl The earlier commit on this branch to fix up this script under mini- test was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of fail- ing silently. M t/uni/fold.t commit fd324599630bd19bc358ce740ec5278e79441822 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 02:01:46 2014 -0700 Really get t/uni/class.t working under miniperl The earlier commit on this branch to fix up this script under mini- test was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of fail- ing silently. M t/uni/class.t commit 62a53d749373204e16ec0b59d45b68699c8cc850 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 02:01:08 2014 -0700 Really get t/uni/cache.t working under miniperl The earlier commit on this branch to fix up this script under mini- test was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of fail- ing silently. M t/uni/cache.t commit dbab6833e3d616532c32dd693ac65b6272b1eda7 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:54:25 2014 -0700 Get t/run/switches.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before Errno.pm is generated and copied into lib/. Only one test was depending on Errno, and it is already skipped under miniperl, so load Errno at run time just before that test, instead of compile time. M t/run/switches.t commit f748c102230411101065d76b314da45509f393ea Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:51:52 2014 -0700 Get t/run/fresh_perl.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before Unicode tables are built are built. So skip the test that depends on them. M t/run/fresh_perl.t commit 05a52670efd0a31e8357b09a926e14f85293141d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:48:01 2014 -0700 Skip uniprops.t under miniperl; add error checking If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before the Unicode tables are built. This script was outputting absolutely nothing in that case, so I changed it to do some error checking and conditionally skip. M t/re/uniprops.t commit 87709a14750d02a4e0c568d2b691f48e80b8020e Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:40:43 2014 -0700 Skip t/re/regexp.t under miniperl unless uni tables exist As of 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/re/regexp.t commit 5f8e5b98892cf0b3d33cd6efa4c89e2ac3d8213d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:40:28 2014 -0700 Skip t/re/regex_sets.t under miniperl unless uni tables exist As of 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/re/regex_sets.t commit 9555cc07f5a57a5ff61577a667b230dad0c42d26 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:40:16 2014 -0700 Get t/re/subst.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/re/subst.t commit fd4eb20c84b7f5a1fb0239273de8eaab164120de Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:33:59 2014 -0700 Skip t/re/reg_mesg.t under miniperl unless uni tables exist As of 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/re/reg_mesg.t commit a3578d1f4bb2909010a802a0a0346c98f2a31ebf Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:32:38 2014 -0700 Skip t/re/pat.t under miniperl unless uni tables exist The earlier commit on this branch to fix up pat.t under minitest was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/re/pat.t commit e484bc145f8378970e51e0f82ef1e4d13ec5fc24 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:31:48 2014 -0700 Get t/re/charset.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before if.pm is copied into lib/. M t/re/charset.t commit f13bc2c98f73336e693c29dba1bd2e263f51c550 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:30:27 2014 -0700 Get write.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/write.t commit 9fe17b616f163eee7322228c5ccbbff961d00f08 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:29:56 2014 -0700 Get warn.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/warn.t commit 6b0e82e198dfba7820de8629617afa3d99f93b64 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:27:30 2014 -0700 Get vec.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/vec.t commit 076f082ded1f2b9ca5c3c9b7e6663376ae5c231c Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:26:56 2014 -0700 Get utftaint.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. Furthermore, as of commit 2db3e09128, attempts to load Unicode tables under miniperl croak instead of failing silently. So skip two tests. M t/op/utftaint.t commit 0322b72e93fce4783a093d287be9767aba7d1ab1 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:24:03 2014 -0700 Get universal.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script, and put base.pm into @INC manually ourselves, as buildcustomize.pl doesnât do it. M t/op/universal.t commit 9169efc3eb16f075c3390728fa2aded5c53ef452 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:23:12 2014 -0700 Get tiehandle.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script, and put base.pm into @INC manually ourselves, as buildcustomize.pl doesnât do it. M t/op/tiehandle.t commit 6734e31472ad8d3f998e82bb76e2fe7da4556120 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:22:10 2014 -0700 Get tie_fetch_count.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/tie_fetch_count.t commit 19295df3ebc93139d919fd706d790a3772fb803d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:21:27 2014 -0700 Get tie.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before base.pm is copied into lib/. M t/op/tie.t commit afe0c9a9eb159187c7de6c473743687d68a451e0 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:17:52 2014 -0700 Get substr.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/substr.t commit 8a72561163c810cf91b5b3bd90a8c0606a229bc1 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:17:05 2014 -0700 Get sprintf.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before version.pm is copied into lib/. M t/op/sprintf.t commit a0d4ab8a4e420f0ac1fe1f7886932fabaaae15ef Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:16:26 2014 -0700 Get split.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/split.t commit ab4454fca8d833400c0b0b5dd7bbcf5e5ab1f46d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:15:57 2014 -0700 Get sort.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/sort.t commit a34c931f42d8560acb9fd1dd6db67d05de351c84 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:15:34 2014 -0700 Get smartmatch.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/smartmatch.t commit 430118520b4f3a2ce673c2803fe711cac107d22d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:14:55 2014 -0700 Get smartkve.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/smartkve.t commit 564e85cba833677fc3be412fb42f044cac3253d0 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:14:03 2014 -0700 Get reverse.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/reverse.t commit d62118709b70fdb5fb9b8da08f6d3ff3d782387d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:13:34 2014 -0700 Get readline.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/readline.t commit f3ab410f848a09ac1aa51acf97aec20136950548 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:12:56 2014 -0700 Get push.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/push.t commit 13ab9e47f0a1c5bcf66a9ffadc1f67f465f2db6a Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:12:11 2014 -0700 Get packagev.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before version.pm is copied into lib/. M t/op/packagev.t commit 2d2933bc92f291f065a4f4b885fe83690276c36a Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:10:08 2014 -0700 Get pack.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script, and put Math::BigInt into @INC manu- ally ourselves, as buildcustomize.pl doesnât do it. M t/op/pack.t commit 636f9bcf7f6c4a08ffbac024d9f11855450d1df8 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:08:25 2014 -0700 Get override.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script, and put Text::ParseWords into @INC manually ourselves, as buildcustomize.pl doesnât do it. M t/op/override.t commit a1bcebeccb51d893e15f13f207494fb091f44f97 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:06:38 2014 -0700 Get my_stash.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/my_stash.t commit ca7cc9e26e35f7610cc68837475683cf956b74fe Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 01:05:35 2014 -0700 Get mkdir.t working under minitest If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before Errno.pm is generated and copied into lib/. M t/op/mkdir.t commit 2e59934fdc76b0c647f808a6a4b97285e2448dac Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:57:33 2014 -0700 Get method.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before base.pm is copied into lib/. M t/op/method.t commit ce7a1d0b1adb5b7bdcf5f6ac361cfc080bd3afc1 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:56:36 2014 -0700 Get lexsub.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/lexsub.t commit 811fe5dc6182d0a1ebbdb8f3705760c6b9d59d11 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:56:06 2014 -0700 Get length.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/length.t commit 8e979a257c15220866df04ae6bce5572e6e0f07d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:55:24 2014 -0700 Skip lc.t under miniperl unless uni tables exist The earlier commit on this branch to fix up lc.t under minitest was written before 2db3e09128 made its way into blead. Now, attempts to load Unicode tables under miniperl croak instead of failing silently. M t/op/lc.t commit 468960c36d2420c5c128862b1b212a3dd1ea8ad0 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:49:07 2014 -0700 Get kvhslice.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/kvhslice.t commit d96e4b1bd6f775723e231bf457fa6ba27cb5663e Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:48:22 2014 -0700 Get kvaslice.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/kvaslice.t commit b21ea4ec155f7b21d93e8b0916b0a87b8810012b Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:47:08 2014 -0700 Get index.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/index.t commit a5dd241d1204607319adbb042c4877b084d01106 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:46:32 2014 -0700 Get inccode.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/inccode.t commit 3f4f620b78186e53bf59b1093c62a30698ddef7a Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:44:46 2014 -0700 Get hash.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/hash.t commit 803ceac6da0ae4c20e05bf09c44f925a8bc56070 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:44:02 2014 -0700 Get gv.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/gv.t commit 6c4c993cdfddfec156ed75d9f7d04f739bfbf6e4 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:40:11 2014 -0700 Get filetest.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script, and put Perl::OSType into @INC manually ourselves, as buildcustomize.pl doesnât do it. M t/op/filetest.t commit 0ea93a5d5274fceff8ab0e574dedece08e5c66f4 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:37:27 2014 -0700 Get coreamp.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before if.pm is copied into lib/. M t/op/coreamp.t commit 63a9daf3c41eff0a9aebab414398819eed124f1f Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:21:21 2014 -0700 Really get chdir.t working under miniperl The earlier commit on this branch was not sufficient for those instances when constant.pm has not yet been copied into lib/. (Also, reword a comment that moved.) M t/op/chdir.t commit a6907639854ef0a281f716c711f99b2ef0d29f8f Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:16:52 2014 -0700 Get blocks.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/blocks.t commit 1c0c4f703b37c723660106cc0248fa794a34ae37 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:16:08 2014 -0700 Get avhv.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/avhv.t commit 3fb18d369961f826ee30a9c41804d5075c5c141d Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:11:34 2014 -0700 Get t/io/open.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before Errno.pm is generated and copied into lib/. M t/io/open.t commit af7058d02269a485de65a1a6ca15cd2528bf3ae8 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:06:33 2014 -0700 Get t/io/fs.t working under miniperl If things are broken enough that make_ext.pl cannot run, then mini- test may run this script before Errno.pm is generated and copied into lib/. M t/io/fs.t commit 8ecb088b85203453d22d593c1e5f38844bf44198 Author: Father Chrysostomos <[email protected]> Date: Tue Sep 2 00:06:26 2014 -0700 Get t/comp/hints.t working under miniperl As of commit 2db3e09128, compiling /\x{100}/i is an error in miniperl if Unicode tables have not been loaded yet. This can happen in minitest if things are broken enough that make_ext.pl cannot run. M t/comp/hints.t commit d512ebc9c6ad4d92b8a1e02d6b530da8d9ddb4f5 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:44:30 2014 -0700 Get t/uni/upper.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/upper.t commit a0338edae3b7f0db54dac7954738bdcb57a737ef Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:43:45 2014 -0700 Get t/uni/title.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/title.t commit e6867999beca02a67014e080a805f4127801c4cd Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:42:51 2014 -0700 Get t/uni/lower.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/lower.t commit 531c3daa8ddb7b682a2982f2a2e5e2b3162a3ec1 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:41:09 2014 -0700 Get t/uni/labels.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/labels.t commit 649716a8e8da01843c160e26bdb22e402b02d47b Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:40:39 2014 -0700 Get t/uni/gv.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/gv.t commit d7a29482266796688db83c177652726319911504 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:40:12 2014 -0700 Get t/uni/fold.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/fold.t commit a91378592e2f4cae219b0f397aeaeab579a4c726 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:39:15 2014 -0700 Get t/uni/class.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/class.t commit f2b25aae946cb16fd38f3531fea3c67b6fdd4a07 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:38:26 2014 -0700 Get t/uni/cache.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/uni/cache.t commit 7be3525f28b7d6eca660834627b50fe59d061e5d Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:36:48 2014 -0700 Get rxcode.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/re/rxcode.t commit 669c551ed2d24d9b0c3472f534d84170bade36f8 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:36:00 2014 -0700 Get reg_eval_scope.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/re/reg_eval_scope.t commit 223a2879075424fec5e3a4c0fa7085f0e878fe19 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:34:41 2014 -0700 Get pat_re_eval.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/re/pat_re_eval.t commit e265c5e6d4d9f6266d408f0b57d7c340e37500a1 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:33:22 2014 -0700 Get tr.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/tr.t commit d27877a4d3782123828808d0bd8c5efc5accb08f Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:32:58 2014 -0700 Get taint.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/taint.t commit f537e6f54257418a24f0faffb5985830eb7e6893 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:32:25 2014 -0700 Get sub.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/sub.t commit 3ffecb73b65140adfe4f1567011191a614eecb50 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:32:04 2014 -0700 Get lc.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/lc.t commit d58f275f2f81fee05c295d8d21bcf2eeffbe75a9 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:30:55 2014 -0700 Get eval.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. M t/op/eval.t commit e1498de268ad7068b3be09dad683985a67e3ad93 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:29:27 2014 -0700 Get closure.t working under minitest minitest can run before everything is built. Hence, we need to make sure the directories that buildcustomize.pl puts in @INC are not clobbered by the test script. Also, we need to make sure that, when run from TEST, we do actually include buildcustomize.pl. M TestInit.pm M t/op/closure.t commit a24e7b321c56e21bd00aa970308e59c69a8c3886 Author: Father Chrysostomos <[email protected]> Date: Sun Aug 31 22:10:00 2014 -0700 Get chdir.t working under minitest minitest can run before everything is built. chdir.t used to take that into account, but was not updated when dist/Cwd/ was renamed. M t/op/chdir.t ----------------------------------------------------------------------- Summary of changes: TestInit.pm | 11 ++++++++++- t/comp/hints.t | 7 ++++++- t/io/fs.t | 5 ++++- t/io/open.t | 36 +++++++++++++++++++++--------------- t/op/avhv.t | 4 ++-- t/op/blocks.t | 2 +- t/op/chdir.t | 11 +++++------ t/op/closure.t | 2 +- t/op/coreamp.t | 2 +- t/op/eval.t | 2 +- t/op/filetest.t | 2 +- t/op/gv.t | 2 +- t/op/hash.t | 2 +- t/op/inccode.t | 2 +- t/op/index.t | 5 +++-- t/op/kvaslice.t | 2 +- t/op/kvhslice.t | 2 +- t/op/lc.t | 6 ++++-- t/op/length.t | 2 +- t/op/lexsub.t | 2 +- t/op/method.t | 2 +- t/op/mkdir.t | 16 ++++++++++++++-- t/op/my_stash.t | 2 +- t/op/override.t | 2 +- t/op/pack.t | 2 +- t/op/packagev.t | 2 +- t/op/push.t | 2 +- t/op/readline.t | 2 +- t/op/reverse.t | 2 +- t/op/smartkve.t | 2 +- t/op/smartmatch.t | 2 +- t/op/sort.t | 4 ++-- t/op/split.t | 2 +- t/op/sprintf.t | 2 +- t/op/sub.t | 2 +- t/op/substr.t | 5 ++--- t/op/taint.t | 2 +- t/op/tie.t | 2 ++ t/op/tie_fetch_count.t | 2 +- t/op/tiehandle.t | 4 ++-- t/op/tr.t | 2 +- t/op/universal.t | 3 ++- t/op/utftaint.t | 10 +++++++--- t/op/vec.t | 4 ++-- t/op/warn.t | 2 +- t/op/write.t | 2 +- t/re/charset.t | 2 +- t/re/pat.t | 1 + t/re/pat_re_eval.t | 2 +- t/re/reg_eval_scope.t | 2 +- t/re/reg_mesg.t | 1 + t/re/regex_sets.t | 1 + t/re/regexp.t | 5 ++++- t/re/rxcode.t | 2 +- t/re/subst.t | 4 ++-- t/re/uniprops.t | 11 +++++++++++ t/run/fresh_perl.t | 2 ++ t/run/switches.t | 7 +++++-- t/test.pl | 13 +++++++++++++ t/uni/cache.t | 5 +++-- t/uni/case.pl | 6 +++++- t/uni/class.t | 5 +++-- t/uni/fold.t | 5 +++-- t/uni/gv.t | 3 ++- t/uni/labels.t | 3 ++- t/uni/lower.t | 3 +-- t/uni/method.t | 2 +- t/uni/opcroak.t | 4 +++- t/uni/parser.t | 1 + t/uni/readline.t | 2 +- t/uni/stash.t | 2 +- t/uni/title.t | 3 +-- t/uni/universal.t | 2 +- t/uni/upper.t | 3 +-- t/uni/variables.t | 1 + 75 files changed, 192 insertions(+), 104 deletions(-) diff --git a/TestInit.pm b/TestInit.pm index 16eb318..f4ed6fd 100644 --- a/TestInit.pm +++ b/TestInit.pm @@ -76,7 +76,16 @@ sub import { } else { # (likely) we're being run by t/TEST or t/harness, and we're a test # in t/ - @INC = '../lib'; + if (defined &DynaLoader::boot_DynaLoader) { + @INC = '../lib'; + } + else { + # miniperl/minitest + # t/TEST does not supply -I../lib, so buildcustomize.pl is + # not automatically included. + unshift @INC, '../lib'; + do "../lib/buildcustomize.pl"; + } } } diff --git a/t/comp/hints.t b/t/comp/hints.t index 391287c..307f298 100644 --- a/t/comp/hints.t +++ b/t/comp/hints.t @@ -122,7 +122,12 @@ BEGIN { my $res; BEGIN { $^H{73174} = "foo" } BEGIN { $res = ($^H{73174} // "") } - "" =~ /\x{100}/i; # forces loading of utf8.pm, which used to reset %^H + # /x{100}/i forces loading of utf8.pm, which used to reset %^H + eval '"" =~ /\x{100}/i; 1' + # Allow miniperl to fail this regexp compilation (effectively skip + # the test) in case tables have not been build, but require real + # perl to succeed. + or defined &DynaLoader::boot_DynaLoader and die; BEGIN { $res .= '-' . ($^H{73174} // "")} $res .= '-' . ($^H{73174} // ""); print $res eq "foo-foo-" ? "" : "not ", diff --git a/t/io/fs.t b/t/io/fs.t index 0d3f435..628a2ca 100644 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -469,7 +469,10 @@ ok(-d $tmpdir1, "rename on directories working"); # Calling unlink on a directory without -U and privileges will always fail, but # it should set errno to EISDIR even though unlink(2) is never called. -{ +SKIP: { + if (is_miniperl && !eval 'require Errno') { + skip "Errno not built yet", 3; + } require Errno; my $tmpdir = tempfile(); diff --git a/t/io/open.t b/t/io/open.t index 3e6efb4..3817bdd 100644 --- a/t/io/open.t +++ b/t/io/open.t @@ -438,23 +438,29 @@ pass("no crash when open autovivifies glob in freed package"); is($WARN, '', "ignore warning on embedded nul with no warnings syscalls"); } - use Errno 'ENOENT'; - # check handling of multiple arguments, which the original patch - # mis-handled - $! = 0; - is (unlink($fn, $fn), 0, "check multiple arguments to unlink"); - is($!+0, ENOENT, "check errno"); - $! = 0; - is (chmod(0644, $fn, $fn), 0, "check multiple arguments to chmod"); - is($!+0, ENOENT, "check errno"); - $! = 0; - is (utime(time, time, $fn, $fn), 0, "check multiple arguments to utime"); - is($!+0, ENOENT, "check errno"); SKIP: { - skip "no chown", 2 unless $Config{d_chown}; + if (is_miniperl && !eval 'require Errno') { + skip "Errno not built yet", 8; + } + require Errno; + import Errno 'ENOENT'; + # check handling of multiple arguments, which the original patch + # mis-handled $! = 0; - is(chown(-1, -1, $fn, $fn), 0, "check multiple arguments to chown"); - is($!+0, ENOENT, "check errno"); + is (unlink($fn, $fn), 0, "check multiple arguments to unlink"); + is($!+0, &ENOENT, "check errno"); + $! = 0; + is (chmod(0644, $fn, $fn), 0, "check multiple arguments to chmod"); + is($!+0, &ENOENT, "check errno"); + $! = 0; + is (utime(time, time, $fn, $fn), 0, "check multiple arguments to utime"); + is($!+0, &ENOENT, "check errno"); + SKIP: { + skip "no chown", 2 unless $Config{d_chown}; + $! = 0; + is(chown(-1, -1, $fn, $fn), 0, "check multiple arguments to chown"); + is($!+0, &ENOENT, "check errno"); + } } is (unlink($fn), 0, "unlink fails with \\0 in name"); diff --git a/t/op/avhv.t b/t/op/avhv.t index d301fad..39a54dc 100644 --- a/t/op/avhv.t +++ b/t/op/avhv.t @@ -5,7 +5,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + require './test.pl'; + set_up_inc('../lib'); } require Tie::Array; @@ -20,7 +21,6 @@ sub STORESIZE { $#{$_[0]} = $_[1]+1 } package main; -require './test.pl'; plan(tests => 40); # Helper function to check the typical error message. diff --git a/t/op/blocks.t b/t/op/blocks.t index fb15eee..bfab9e0 100644 --- a/t/op/blocks.t +++ b/t/op/blocks.t @@ -2,8 +2,8 @@ BEGIN { chdir 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 7; diff --git a/t/op/chdir.t b/t/op/chdir.t index 2c6535b..d785285 100644 --- a/t/op/chdir.t +++ b/t/op/chdir.t @@ -1,16 +1,15 @@ #!./perl -w BEGIN { + # We really want to know if chdir is working, as the build process will + # all go wrong if it is not. So avoid clearing @INC under miniperl. + @INC = () if defined &DynaLoader::boot_DynaLoader; + # We're not going to chdir() into 't' because we don't know if # chdir() works! Instead, we'll hedge our bets and put both # possibilities into @INC. - @INC = qw(t . lib ../lib); + unshift @INC, qw(t . lib ../lib); require "test.pl"; - # Really want to know if chdir is working, as the build process will all go - # wrong if it is not. - if (is_miniperl() && !eval {require File::Spec::Functions; 1}) { - push @INC, qw(dist/Cwd/lib dist/Cwd ../dist/Cwd/lib ../dist/Cwd); - } plan(tests => 48); } diff --git a/t/op/closure.t b/t/op/closure.t index 82e65c5..569724f 100644 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -8,8 +8,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use Config; diff --git a/t/op/coreamp.t b/t/op/coreamp.t index aef3260..ffd02df 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -9,7 +9,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); + @INC = qw(. ../lib ../dist/if); require "test.pl"; $^P |= 0x100; } diff --git a/t/op/eval.t b/t/op/eval.t index f404df5..fcfe675 100644 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan(tests => 132); diff --git a/t/op/filetest.t b/t/op/filetest.t index 7316442..91ebe9c 100644 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -5,8 +5,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc(qw '../lib ../cpan/Perl-OSType/lib'); } plan(tests => 53 + 27*14); diff --git a/t/op/gv.t b/t/op/gv.t index c1b741a..5fa8d6d 100644 --- a/t/op/gv.t +++ b/t/op/gv.t @@ -6,8 +6,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use warnings; diff --git a/t/op/hash.t b/t/op/hash.t index 5f4c143..429eb38 100644 --- a/t/op/hash.t +++ b/t/op/hash.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use strict; diff --git a/t/op/inccode.t b/t/op/inccode.t index 1a0b919..016b425 100644 --- a/t/op/inccode.t +++ b/t/op/inccode.t @@ -4,8 +4,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); require './test.pl'; + set_up_inc('../lib'); } use Config; diff --git a/t/op/index.t b/t/op/index.t index 78faeb6..2bb6cd1 100644 --- a/t/op/index.t +++ b/t/op/index.t @@ -2,8 +2,9 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; - require './test.pl'; require './charset_tools.pl'; + require './test.pl'; + set_up_inc('../lib'); + require './charset_tools.pl'; } use strict; diff --git a/t/op/kvaslice.t b/t/op/kvaslice.t index e8aa14e..16ee446 100644 --- a/t/op/kvaslice.t +++ b/t/op/kvaslice.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } # use strict; diff --git a/t/op/kvhslice.t b/t/op/kvhslice.t index b30e631..a5357ad 100644 --- a/t/op/kvhslice.t +++ b/t/op/kvhslice.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } # use strict; diff --git a/t/op/lc.t b/t/op/lc.t index bb5d4c1..5cf6664 100644 --- a/t/op/lc.t +++ b/t/op/lc.t @@ -4,9 +4,11 @@ BEGIN { chdir 't'; - @INC = '../lib'; + require './test.pl'; + set_up_inc('../lib'); require Config; import Config; - require './test.pl'; require './charset_tools.pl'; + skip_all_without_unicode_tables(); + require './charset_tools.pl'; require './loc_tools.pl'; # Contains find_utf8_ctype_locale() } diff --git a/t/op/length.t b/t/op/length.t index b144b09..2cba924 100644 --- a/t/op/length.t +++ b/t/op/length.t @@ -3,7 +3,7 @@ BEGIN { chdir 't' if -d 't'; require './test.pl'; - @INC = '../lib'; + set_up_inc('../lib'); } plan (tests => 41); diff --git a/t/op/lexsub.t b/t/op/lexsub.t index efb5309..e37fba1 100644 --- a/t/op/lexsub.t +++ b/t/op/lexsub.t @@ -2,8 +2,8 @@ BEGIN { chdir 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); *bar::is = *is; *bar::like = *like; } diff --git a/t/op/method.t b/t/op/method.t index 648f003..31e2ea1 100644 --- a/t/op/method.t +++ b/t/op/method.t @@ -6,7 +6,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib lib); + @INC = qw(. ../lib lib ../dist/base/lib); require "test.pl"; } diff --git a/t/op/mkdir.t b/t/op/mkdir.t index d5c04b3..8096213 100644 --- a/t/op/mkdir.t +++ b/t/op/mkdir.t @@ -22,13 +22,25 @@ unless (eval { $ENV{'LC_ALL'} = 'C'; $ENV{LANGUAGE} = 'C'; # GNU locale extension +sub errno_or_skip { + SKIP: { + if (is_miniperl && !eval 'require Errno') { + skip "Errno not built yet", 1; + } + eval "ok($_[0])"; + } +} + ok(mkdir('blurfl',0777)); ok(!mkdir('blurfl',0777)); -ok($!{EEXIST} || $! =~ /cannot move|exist|denied|unknown/i); +errno_or_skip('$!{EEXIST} || $! =~ /cannot move|exist|denied|unknown/i'); ok(-d 'blurfl'); ok(rmdir('blurfl')); ok(!rmdir('blurfl')); -ok($!{ENOENT} || $! =~ /cannot find|such|exist|not found|not a directory|unknown/i); +errno_or_skip(' + $!{ENOENT} + || $! =~ /cannot find|such|exist|not found|not a directory|unknown/i +'); ok(mkdir('blurfl')); ok(rmdir('blurfl')); diff --git a/t/op/my_stash.t b/t/op/my_stash.t index 6ec7619..1e728e2 100644 --- a/t/op/my_stash.t +++ b/t/op/my_stash.t @@ -4,8 +4,8 @@ package Foo; BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan 9; diff --git a/t/op/override.t b/t/op/override.t index ce740ea..1d45617 100644 --- a/t/op/override.t +++ b/t/op/override.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc(qw '../lib ../cpan/Text-ParseWords/lib'); require Config; # load these before we mess with *CORE::GLOBAL::require require 'Config_heavy.pl'; # since runperl will need them } diff --git a/t/op/pack.t b/t/op/pack.t index 357f15b..9340f32 100644 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc(qw '../lib ../dist/Math-BigInt/lib'); } # This is truth in an if statement, and could be a skip message diff --git a/t/op/packagev.t b/t/op/packagev.t index f4e094c..563e444 100644 --- a/t/op/packagev.t +++ b/t/op/packagev.t @@ -2,7 +2,7 @@ BEGIN { chdir 't'; - @INC = '../lib'; + @INC = qw '../lib ../cpan/version/lib'; require './test.pl'; } diff --git a/t/op/push.t b/t/op/push.t index 409920a..f4b034f 100644 --- a/t/op/push.t +++ b/t/op/push.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } @tests = split(/\n/, <<EOF); diff --git a/t/op/readline.t b/t/op/readline.t index 99ff63c..0c5619f 100644 --- a/t/op/readline.t +++ b/t/op/readline.t @@ -2,8 +2,8 @@ BEGIN { chdir 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 30; diff --git a/t/op/reverse.t b/t/op/reverse.t index 0796614..059ece2 100644 --- a/t/op/reverse.t +++ b/t/op/reverse.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 26; diff --git a/t/op/smartkve.t b/t/op/smartkve.t index 85eb9e8..bab5d61 100644 --- a/t/op/smartkve.t +++ b/t/op/smartkve.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use strict; use warnings; diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index ed4b3ec..bbd6372 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -2,8 +2,8 @@ BEGIN { chdir 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use strict; use warnings; diff --git a/t/op/sort.t b/t/op/sort.t index dd60f97..59757e1 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); - require 'test.pl'; + require './test.pl'; + set_up_inc('../lib'); } use warnings; plan( tests => 182 ); diff --git a/t/op/split.t b/t/op/split.t index 7e0008e..007eb00 100644 --- a/t/op/split.t +++ b/t/op/split.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 119; diff --git a/t/op/sprintf.t b/t/op/sprintf.t index 74bf130..f534a86 100644 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -10,7 +10,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + @INC = qw '../lib ../cpan/version/lib'; } use warnings; use version; diff --git a/t/op/sub.t b/t/op/sub.t index 575fa17..1d865bf 100644 --- a/t/op/sub.t +++ b/t/op/sub.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan( tests => 37 ); diff --git a/t/op/substr.t b/t/op/substr.t index 8946759..801895d 100644 --- a/t/op/substr.t +++ b/t/op/substr.t @@ -4,7 +4,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + require './test.pl'; + set_up_inc('../lib'); } use warnings ; @@ -21,8 +22,6 @@ $SIG{__WARN__} = sub { } }; -BEGIN { require './test.pl'; } - plan(387); run_tests() unless caller; diff --git a/t/op/taint.t b/t/op/taint.t index 6ec66ce..cb9074d 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -9,8 +9,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use strict; diff --git a/t/op/tie.t b/t/op/tie.t index e0b2499..aff685b 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -27,6 +27,8 @@ tie %h, Tie::StdHash; untie %h; EXPECT ######## +# SKIP !defined &DynaLoader::boot_DynaLoader && !eval 'require base' +# (skip under miniperl if base.pm is not in lib/ yet) # standard behaviour, without any extra references use Tie::Hash ; diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index 9f60bb4..c97b9b4 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -5,8 +5,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); plan (tests => 312); } diff --git a/t/op/tiehandle.t b/t/op/tiehandle.t index 08a20eb..21f56fc 100644 --- a/t/op/tiehandle.t +++ b/t/op/tiehandle.t @@ -2,14 +2,14 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + require './test.pl'; + set_up_inc(qw '../lib ../dist/base/lib'); } my @expect; my $data = ""; my @data = (); -require './test.pl'; plan(tests => 67); sub compare { diff --git a/t/op/tr.t b/t/op/tr.t index 580d55a..8a7dd8a 100644 --- a/t/op/tr.t +++ b/t/op/tr.t @@ -4,8 +4,8 @@ use utf8; BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 134; diff --git a/t/op/universal.t b/t/op/universal.t index 494bc99..116f923 100644 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -5,7 +5,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + require './test.pl'; + set_up_inc(qw '../lib ../dist/base/lib'); $| = 1; require "./test.pl"; } diff --git a/t/op/utftaint.t b/t/op/utftaint.t index d734927..da4f842 100644 --- a/t/op/utftaint.t +++ b/t/op/utftaint.t @@ -3,7 +3,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib); + require './test.pl'; + set_up_inc('../lib'); } use strict; @@ -17,7 +18,6 @@ sub tainted ($) { any_tainted @_; } -require './test.pl'; plan(tests => 3*10 + 3*8 + 2*16 + 3); my $arg = $ENV{PATH}; # a tainted value @@ -140,7 +140,11 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) { is(tainted($taint), tainted($arg), "tainted: $encode, downgrade down"); } -{ +SKIP: { + if (is_miniperl()) { + skip_if_miniperl("Unicode tables not built yet", 2) + unless eval 'require "unicore/Heavy.pl"'; + } fresh_perl_is('$a = substr $^X, 0, 0; /\x{100}/i; /$a\x{100}/i || print q,ok,', 'ok', {switches => ["-T", "-l"]}, "matching a regexp is taint agnostic"); diff --git a/t/op/vec.t b/t/op/vec.t index 30badb0..141a6da 100644 --- a/t/op/vec.t +++ b/t/op/vec.t @@ -2,10 +2,10 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); + require './test.pl'; + set_up_inc('../lib'); } -require "test.pl"; plan( tests => 35 ); my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; diff --git a/t/op/warn.t b/t/op/warn.t index 741c2c7..4d679c2 100644 --- a/t/op/warn.t +++ b/t/op/warn.t @@ -3,8 +3,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan 32; diff --git a/t/op/write.t b/t/op/write.t index 7591cde..653561f 100644 --- a/t/op/write.t +++ b/t/op/write.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use strict; # Amazed that this hackery can be made strict ... diff --git a/t/re/charset.t b/t/re/charset.t index 76a3bce..4d0d99c 100644 --- a/t/re/charset.t +++ b/t/re/charset.t @@ -2,7 +2,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + @INC = qw '../lib ../dist/if'; require './test.pl'; require './loc_tools.pl'; } diff --git a/t/re/pat.t b/t/re/pat.t index ba64d29..b87b007 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -18,6 +18,7 @@ BEGIN { @INC = ('../lib','.','../ext/re'); require Config; import Config; require './test.pl'; + skip_all_without_unicode_tables(); } plan tests => 739; # Update this when adding/deleting tests. diff --git a/t/re/pat_re_eval.t b/t/re/pat_re_eval.t index 309d0e9..c77439a 100644 --- a/t/re/pat_re_eval.t +++ b/t/re/pat_re_eval.t @@ -17,8 +17,8 @@ $| = 1; BEGIN { chdir 't' if -d 't'; - @INC = ('../lib','.'); require './test.pl'; + set_up_inc('../lib'); } diff --git a/t/re/reg_eval_scope.t b/t/re/reg_eval_scope.t index 0e35e29..0eaeeb9 100644 --- a/t/re/reg_eval_scope.t +++ b/t/re/reg_eval_scope.t @@ -4,8 +4,8 @@ BEGIN { chdir 't'; - @INC = qw(lib ../lib); require './test.pl'; + set_up_inc(qw(lib ../lib)); } plan 48; diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index d4df2ec..d8f47e1 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -4,6 +4,7 @@ BEGIN { chdir 't' if -d 't'; @INC = qw '../lib ../ext/re'; require './test.pl'; + skip_all_without_unicode_tables(); eval 'require Config'; # assume defaults if this fails } diff --git a/t/re/regex_sets.t b/t/re/regex_sets.t index 2df6148..c1ca860 100644 --- a/t/re/regex_sets.t +++ b/t/re/regex_sets.t @@ -14,6 +14,7 @@ BEGIN { chdir 't' if -d 't'; @INC = ('../lib','.','../ext/re'); require './test.pl'; + skip_all_without_unicode_tables(); } use utf8; diff --git a/t/re/regexp.t b/t/re/regexp.t index fd1da7c..59680fb 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -60,7 +60,10 @@ BEGIN { chdir 't' if -d 't'; @INC = qw '../lib ../ext/re'; - + if (!defined &DynaLoader::boot_DynaLoader) { # miniperl + print("1..0 # Skip Unicode tables not built yet\n"), exit + unless eval 'require "unicore/Heavy.pl"'; + } } sub _comment { diff --git a/t/re/rxcode.t b/t/re/rxcode.t index 19a859b..263c234 100644 --- a/t/re/rxcode.t +++ b/t/re/rxcode.t @@ -2,8 +2,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 40; diff --git a/t/re/subst.t b/t/re/subst.t index b85ff3b..7b9a44b 100644 --- a/t/re/subst.t +++ b/t/re/subst.t @@ -2,9 +2,9 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; - require Config; import Config; require './test.pl'; + set_up_inc('../lib'); + require Config; import Config; require './charset_tools.pl'; } diff --git a/t/re/uniprops.t b/t/re/uniprops.t index 590101c..7960771 100644 --- a/t/re/uniprops.t +++ b/t/re/uniprops.t @@ -16,4 +16,15 @@ if ($Config::Config{ccflags} =~ /(?:^|\s)-DPERL_DEBUG_READONLY_COW\b/) { do '../lib/unicore/TestProp.pl'; +# Since TestProp.pl explicitly exits, we will only get here if it +# could not load. +if (defined &DynaLoader::boot_DynaLoader # not miniperl + || eval 'require "unicore/Heavy.pl"' # or tables are built +) { + die "Could not run lib/unicore/TestProp.pl: ", $@||$!; +} +else { + print "1..0 # Skip Unicode tables not built yet\n"; +} + 0 diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 885c8cc..f148317 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -742,6 +742,8 @@ utf8::upgrade($_); # the original code used a UTF-8 locale (affects STDIN) /^([[:digit:]]+)/; EXPECT ######## [perl #20667] unicode regex vs non-unicode regex +# SKIP: !defined &DynaLoader::boot_DynaLoader && !eval 'require "unicore/Heavy.pl"' +# (skip under miniperl if Unicode tables are not built yet) $toto = 'Hello'; $toto =~ /\w/; # this line provokes the problem! $name = 'A B'; diff --git a/t/run/switches.t b/t/run/switches.t index a2e4bad..09b77c7 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -15,7 +15,6 @@ BEGIN { require "./test.pl"; } plan(tests => 115); use Config; -use Errno qw(EACCES EISDIR); BEGIN { eval 'use POSIX qw(setlocale LC_ALL)' } # due to a bug in VMS's piping which makes it impossible for runperl() @@ -123,7 +122,11 @@ SKIP: { # Win32 won't let us open the directory, so we never get to die with # EISDIR, which happens after open. - my $error = do { local $! = $^O eq 'MSWin32' ? EACCES : EISDIR; "$!" }; + require Errno; + import Errno qw(EACCES EISDIR); + my $error = do { + local $! = $^O eq 'MSWin32' ? &EACCES : &EISDIR; "$!" + }; like( runperl( switches => [ '-c' ], args => [ $tempdir ], stderr => 1), qr/Can't open perl script.*$tempdir.*\Q$error/s, diff --git a/t/test.pl b/t/test.pl index 13db432..d9a3220 100644 --- a/t/test.pl +++ b/t/test.pl @@ -105,6 +105,12 @@ sub is_miniperl { return !defined &DynaLoader::boot_DynaLoader; } +sub set_up_inc { + # Donât clobber @INC under miniperl + @INC = () unless is_miniperl; + unshift @INC, @_; +} + sub _comment { return map { /^#/ ? "$_\n" : "# $_\n" } map { split /\n/ } @_; @@ -158,6 +164,13 @@ sub skip_all_without_config { } } +sub skip_all_without_unicode_tables { # (but only under miniperl) + if (is_miniperl()) { + skip_all_if_miniperl("Unicode tables not built yet") + unless eval 'require "unicore/Heavy.pl"'; + } +} + sub find_git_or_skip { my ($source_dir, $reason); if (-d '.git') { diff --git a/t/uni/cache.t b/t/uni/cache.t index 7b6e31e..50087c1 100644 --- a/t/uni/cache.t +++ b/t/uni/cache.t @@ -1,7 +1,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib .); - require "test.pl"; + require './test.pl'; + set_up_inc('../lib'); + skip_all_without_unicode_tables(); } plan tests => 1; diff --git a/t/uni/case.pl b/t/uni/case.pl index 08df670..f9c3640 100644 --- a/t/uni/case.pl +++ b/t/uni/case.pl @@ -1,4 +1,8 @@ -require "test.pl"; +BEGIN { + require "test.pl"; + set_up_inc(qw(../lib .)); + skip_all_without_unicode_tables(); +} use strict; use warnings; diff --git a/t/uni/class.t b/t/uni/class.t index ab21b02..92038c0 100644 --- a/t/uni/class.t +++ b/t/uni/class.t @@ -1,7 +1,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib .); - require "test.pl"; + require './test.pl'; + set_up_inc(qw(../lib .)); + skip_all_without_unicode_tables(); } plan tests => 11; diff --git a/t/uni/fold.t b/t/uni/fold.t index f016d30..e3542c0 100644 --- a/t/uni/fold.t +++ b/t/uni/fold.t @@ -6,9 +6,10 @@ use warnings; BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; - require Config; import Config; require './test.pl'; + set_up_inc('../lib'); + skip_all_without_unicode_tables(); + require Config; import Config; require './loc_tools.pl'; # Contains find_utf8_ctype_locale() } diff --git a/t/uni/gv.t b/t/uni/gv.t index 670bb6a..9143034 100644 --- a/t/uni/gv.t +++ b/t/uni/gv.t @@ -6,8 +6,9 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); + skip_all_without_unicode_tables(); } use utf8; diff --git a/t/uni/labels.t b/t/uni/labels.t index 3fa9d38..efae494 100644 --- a/t/uni/labels.t +++ b/t/uni/labels.t @@ -4,8 +4,9 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); + skip_all_without_unicode_tables(); } use utf8; diff --git a/t/uni/lower.t b/t/uni/lower.t index 5b706af..8c8a053 100644 --- a/t/uni/lower.t +++ b/t/uni/lower.t @@ -1,7 +1,6 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib uni .); - require "case.pl"; + require "uni/case.pl"; } casetest(0, # No extra tests run here, diff --git a/t/uni/method.t b/t/uni/method.t index 4f9d72d..abe3c83 100644 --- a/t/uni/method.t +++ b/t/uni/method.t @@ -6,7 +6,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); + @INC = qw(. ../lib ../cpan/parent/lib); require "test.pl"; } diff --git a/t/uni/opcroak.t b/t/uni/opcroak.t index 29909d7..7bc9024 100644 --- a/t/uni/opcroak.t +++ b/t/uni/opcroak.t @@ -6,7 +6,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + @INC = qw '../lib ../dist/base/lib'; require './test.pl'; } @@ -34,6 +34,8 @@ like $@, qr/Type of arg 1 to main::\x{30cd} must be/u, "bad type croak is UTF-8 } END_FIELDS +die $@ if $@; + for ( [ element => 'my FÅÅ $bà r = FÅÅ->new; $bà r->{ã¯ã©ã¹};' ], [ slice => 'my FÅÅ $bà r = FÅÅ->new; @{$bà r}{ qw( a ã¯ã©ã¹ ) };' ] diff --git a/t/uni/parser.t b/t/uni/parser.t index b71ca88..7b958af 100644 --- a/t/uni/parser.t +++ b/t/uni/parser.t @@ -5,6 +5,7 @@ BEGIN { require './test.pl'; + skip_all_without_unicode_tables(); } plan (tests => 52); diff --git a/t/uni/readline.t b/t/uni/readline.t index f865bc0..294262e 100644 --- a/t/uni/readline.t +++ b/t/uni/readline.t @@ -2,8 +2,8 @@ BEGIN { chdir 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } plan tests => 7; diff --git a/t/uni/stash.t b/t/uni/stash.t index 3d41e40..31d6c9d 100644 --- a/t/uni/stash.t +++ b/t/uni/stash.t @@ -6,8 +6,8 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; require './test.pl'; + set_up_inc('../lib'); } use utf8; diff --git a/t/uni/title.t b/t/uni/title.t index 2d6dcb7..6acaf55 100644 --- a/t/uni/title.t +++ b/t/uni/title.t @@ -1,7 +1,6 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib uni .); - require "case.pl"; + require "uni/case.pl"; } casetest(0, # No extra tests run here, diff --git a/t/uni/universal.t b/t/uni/universal.t index c999dd8..56b41d4 100644 --- a/t/uni/universal.t +++ b/t/uni/universal.t @@ -5,7 +5,7 @@ BEGIN { chdir 't' if -d 't'; - @INC = '../lib'; + @INC = qw '../lib ../dist/base/lib'; $| = 1; require "./test.pl"; } diff --git a/t/uni/upper.t b/t/uni/upper.t index 315680c..c8bdb4b 100644 --- a/t/uni/upper.t +++ b/t/uni/upper.t @@ -1,7 +1,6 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(../lib uni .); - require "case.pl"; + require "uni/case.pl"; } is(uc("\x{3B1}\x{345}\x{301}"), "\x{391}\x{301}\x{399}", 'Verify moves YPOGEGRAMMENI'); diff --git a/t/uni/variables.t b/t/uni/variables.t index d802a0a..23d3503 100644 --- a/t/uni/variables.t +++ b/t/uni/variables.t @@ -5,6 +5,7 @@ BEGIN { require './test.pl'; + skip_all_without_unicode_tables(); } use 5.016; -- Perl5 Master Repository
