In perl.git, the branch jkeenan/133771-file-find has been updated <https://perl5.git.perl.org/perl.git/commitdiff/38be248847162d2070f72bd7d8ef3f3b0189c313?hp=63641d8ad931fed56a4cca11844f4de9ed50a6a2>
- Log ----------------------------------------------------------------- commit 38be248847162d2070f72bd7d8ef3f3b0189c313 Author: James E Keenan <[email protected]> Date: Tue Jul 9 12:12:06 2019 -0400 Get make minitest working commit 3f7ab9aa2466822b67750e74635475c67c39c94c Author: James E Keenan <[email protected]> Date: Tue Jul 9 12:09:13 2019 -0400 Get make minitest working ----------------------------------------------------------------------- Summary of changes: MANIFEST | 404 ++++++ t/base/cond.t | 17 + t/base/if.t | 9 + t/base/lex.t | 588 +++++++++ t/base/num.t | 213 +++ t/base/pat.t | 9 + t/base/rs.t | 312 +++++ t/base/term.t | 52 + t/base/translate.t | 26 + t/base/while.t | 33 + t/cmd/elsif.t | 23 + t/cmd/for.t | 108 ++ t/cmd/mod.t | 56 + t/cmd/subval.t | 184 +++ t/cmd/switch.t | 73 ++ t/comp/bproto.t | 55 + t/comp/cmdopt.t | 88 ++ t/comp/colon.t | 135 ++ t/comp/decl.t | 61 + t/comp/filter_exception.t | 32 + t/comp/final_line_num.t | 13 + t/comp/fold.t | 194 +++ t/comp/form_scope.t | 160 +++ t/comp/hints.t | 290 +++++ t/comp/line_debug.t | 37 + t/comp/multiline.t | 90 ++ t/comp/opsubs.t | 209 +++ t/comp/our.t | 75 ++ t/comp/package.t | 74 ++ t/comp/package_block.t | 92 ++ t/comp/parser.t | 759 +++++++++++ t/comp/parser_run.t | 59 + t/comp/proto.t | 894 +++++++++++++ t/comp/redef.t | 86 ++ t/comp/require.t | 389 ++++++ t/comp/retainedlines.t | 176 +++ t/comp/term.t | 72 ++ t/comp/uproto.t | 127 ++ t/comp/use.t | 299 +++++ t/comp/utf.t | 104 ++ t/io/argv.t | 268 ++++ t/io/binmode.t | 40 + t/io/bom.t | 27 + t/io/closepid.t | 48 + t/io/crlf.t | 112 ++ t/io/crlf_through.t | 10 + t/io/data.t | 90 ++ t/io/defout.t | 55 + t/io/dup.t | 144 +++ t/io/eintr.t | 162 +++ t/io/eintr_print.t | 95 ++ t/io/errno.t | 47 + t/io/errnosig.t | 30 + t/io/fflush.t | 131 ++ t/io/fs.t | 534 ++++++++ t/io/getcwd.t | 22 + t/io/inplace.t | 111 ++ t/io/iofile.t | 26 + t/io/iprefix.t | 38 + t/io/layers.t | 253 ++++ t/io/nargv.t | 140 ++ t/io/open.t | 563 ++++++++ t/io/openpid.t | 108 ++ t/io/paragraph_mode.t | 504 ++++++++ t/io/perlio.t | 259 ++++ t/io/perlio_fail.t | 49 + t/io/perlio_leaks.t | 35 + t/io/perlio_open.t | 36 + t/io/pipe.t | 273 ++++ t/io/print.t | 78 ++ t/io/pvbm.t | 84 ++ t/io/read.t | 37 + t/io/say.t | 60 + t/io/sem.t | 72 ++ t/io/semctl.t | 27 + t/io/shm.t | 90 ++ t/io/socket.t | 302 +++++ t/io/socketpair.t | 51 + t/io/tell.t | 196 +++ t/io/through.t | 175 +++ t/io/utf8.t | 400 ++++++ t/lib/Count.pm | 8 + t/lib/Devel/nodb.pm | 3 + t/lib/Devel/switchd.pm | 9 + t/lib/Devel/switchd_empty.pm | 2 + t/lib/Devel/switchd_goto.pm | 6 + t/lib/test_require.pm | 6 + t/lib/test_use.pm | 11 + t/lib/test_use_14937.pm | 1 + t/op/64bitint.t | 463 +++++++ t/op/aassign.t | 597 +++++++++ t/op/alarm.t | 63 + t/op/anonconst.t | 51 + t/op/anonsub.t | 114 ++ t/op/append.t | 72 ++ t/op/args.t | 110 ++ t/op/array.t | 691 ++++++++++ t/op/assignwarn.t | 64 + t/op/attrhand.t | 63 + t/op/attrproto.t | 135 ++ t/op/attrs.t | 513 ++++++++ t/op/auto.t | 65 + t/op/avhv.t | 284 ++++ t/op/bless.t | 236 ++++ t/op/blocks.t | 267 ++++ t/op/bop.t | 642 +++++++++ t/op/caller.pl | 175 +++ t/op/caller.t | 350 +++++ t/op/catch.t | 50 + t/op/chars.t | 88 ++ t/op/chdir.t | 203 +++ t/op/chop.t | 305 +++++ t/op/chr.t | 92 ++ t/op/closure.t | 814 ++++++++++++ t/op/closure_test.pl | 10 + t/op/concat2.t | 59 + t/op/cond.t | 31 + t/op/const-optree.t | 494 +++++++ t/op/context.t | 34 + t/op/coreamp.t | 1232 ++++++++++++++++++ t/op/coresubs.t | 179 +++ t/op/cproto.t | 286 +++++ t/op/crypt.t | 67 + t/op/current_sub.t | 96 ++ t/op/dbm.t | 72 ++ t/op/decl-refs.t | 122 ++ t/op/defined.t | 20 + t/op/defins.t | 228 ++++ t/op/delete.t | 171 +++ t/op/die.t | 104 ++ t/op/die_except.t | 81 ++ t/op/die_exit.t | 82 ++ t/op/die_keeperr.t | 77 ++ t/op/die_unwind.t | 72 ++ t/op/do.t | 320 +++++ t/op/dor.t | 100 ++ t/op/dump.t | 106 ++ t/op/each.t | 294 +++++ t/op/each_array.t | 197 +++ t/op/eval.t | 699 ++++++++++ t/op/evalbytes.t | 40 + t/op/exec.t | 214 +++ t/op/exists_sub.t | 83 ++ t/op/exp.t | 121 ++ t/op/fh.t | 29 + t/op/filehandle.t | 23 + t/op/filetest.t | 387 ++++++ t/op/filetest_stack_ok.t | 55 + t/op/filetest_t.t | 38 + t/op/flip.t | 109 ++ t/op/for.t | 680 ++++++++++ t/op/fork.t | 533 ++++++++ t/op/fresh_perl_utf8.t | 21 + t/op/getpid.t | 52 + t/op/getppid.t | 119 ++ t/op/glob.t | 146 +++ t/op/gmagic.t | 242 ++++ t/op/goto.t | 886 +++++++++++++ t/op/goto_xs.t | 113 ++ t/op/grent.t | 188 +++ t/op/grep.t | 240 ++++ t/op/groups.t | 417 ++++++ t/op/gv.t | 1232 ++++++++++++++++++ t/op/hash-rt85026.t | 69 + t/op/hash.t | 264 ++++ t/op/hashassign.t | 533 ++++++++ t/op/hashwarn.t | 90 ++ t/op/heredoc.t | 235 ++++ t/op/hexfp.t | 282 ++++ t/op/inc.t | 388 ++++++ t/op/inccode-tie.t | 15 + t/op/inccode.t | 398 ++++++ t/op/incfilter.t | 298 +++++ t/op/index.t | 335 +++++ t/op/index_thr.t | 3 + t/op/infnan.t | 565 ++++++++ t/op/int.t | 85 ++ t/op/join.t | 130 ++ t/op/kill0.t | 108 ++ t/op/kvaslice.t | 194 +++ t/op/kvhslice.t | 204 +++ t/op/lc.t | 440 +++++++ t/op/leaky-magic.t | 125 ++ t/op/length.t | 248 ++++ t/op/lex.t | 286 +++++ t/op/lex_assign.t | 388 ++++++ t/op/lexsub.t | 962 ++++++++++++++ t/op/lfs.t | 240 ++++ t/op/list.t | 277 ++++ t/op/local.t | 866 +++++++++++++ t/op/localref.t | 99 ++ t/op/lock.t | 16 + t/op/loopctl.t | 1120 ++++++++++++++++ t/op/lop.t | 107 ++ t/op/lvref.t | 654 ++++++++++ t/op/magic-27839.t | 37 + t/op/magic.t | 856 ++++++++++++ t/op/method.t | 731 +++++++++++ t/op/mkdir.t | 60 + t/op/multideref.t | 246 ++++ t/op/my.t | 174 +++ t/op/my_stash.t | 39 + t/op/mydef.t | 15 + t/op/negate.t | 113 ++ t/op/not.t | 95 ++ t/op/numconvert.t | 266 ++++ t/op/oct.t | 142 ++ t/op/or.t | 103 ++ t/op/ord.t | 74 ++ t/op/overload_integer.t | 35 + t/op/override.t | 179 +++ t/op/pack.t | 2086 ++++++++++++++++++++++++++++++ t/op/packagev.t | 185 +++ t/op/pos.t | 161 +++ t/op/postfixderef.t | 383 ++++++ t/op/pow.t | 72 ++ t/op/print.t | 30 + t/op/protowarn.t | 108 ++ t/op/push.t | 87 ++ t/op/pwent.t | 257 ++++ t/op/qr.t | 169 +++ t/op/quotemeta.t | 148 +++ t/op/rand.t | 140 ++ t/op/range.t | 451 +++++++ t/op/read.t | 98 ++ t/op/readdir.t | 89 ++ t/op/readline.t | 299 +++++ t/op/recurse.t | 132 ++ t/op/ref.t | 916 +++++++++++++ t/op/repeat.t | 276 ++++ t/op/require_37033.t | 44 + t/op/require_errors.t | 273 ++++ t/op/require_override.t | 59 + t/op/reset.t | 241 ++++ t/op/reverse.t | 98 ++ t/op/rt119311.t | 237 ++++ t/op/runlevel.t | 368 ++++++ t/op/select.t | 37 + t/op/setpgrpstack.t | 15 + t/op/sigdispatch.t | 169 +++ t/op/signatures.t | 1558 ++++++++++++++++++++++ t/op/sigsystem.t | 65 + t/op/sleep.t | 22 + t/op/smartkve.t | 118 ++ t/op/smartmatch.t | 592 +++++++++ t/op/sort.t | 1185 +++++++++++++++++ t/op/splice.t | 111 ++ t/op/split.t | 669 ++++++++++ t/op/split_unicode.t | 79 ++ t/op/sprintf.t | 776 +++++++++++ t/op/sprintf2.t | 1163 +++++++++++++++++ t/op/srand.t | 90 ++ t/op/sselect.t | 106 ++ t/op/stash.t | 358 ++++++ t/op/stash_parse_gv.t | 31 + t/op/stat.t | 652 ++++++++++ t/op/stat_errors.t | 58 + t/op/state.t | 552 ++++++++ t/op/study.t | 160 +++ t/op/studytied.t | 51 + t/op/sub.t | 428 ++++++ t/op/sub_lval.t | 1098 ++++++++++++++++ t/op/substr.t | 921 +++++++++++++ t/op/substr_thr.t | 3 + t/op/svleak.pl | 1 + t/op/svleak.t | 647 ++++++++++ t/op/switch.t | 1385 ++++++++++++++++++++ t/op/symbolcache.t | 43 + t/op/sysio.t | 228 ++++ t/op/taint.t | 2926 ++++++++++++++++++++++++++++++++++++++++++ t/op/threads-dirh.t | 130 ++ t/op/threads.t | 426 ++++++ t/op/threads_create.pl | 2 + t/op/tie.t | 1624 +++++++++++++++++++++++ t/op/tie_fetch_count.t | 421 ++++++ t/op/tiearray.t | 326 +++++ t/op/tiehandle.t | 310 +++++ t/op/time.t | 250 ++++ t/op/time_loop.t | 16 + t/op/tr.t | 1148 +++++++++++++++++ t/op/tr_latin1.t | 20 + t/op/undef.t | 155 +++ t/op/universal.t | 345 +++++ t/op/unlink.t | 38 + t/op/unshift.t | 79 ++ t/op/upgrade.t | 50 + t/op/utf8cache.t | 165 +++ t/op/utf8decode.t | 299 +++++ t/op/utf8magic.t | 39 + t/op/utfhash.t | 221 ++++ t/op/utftaint.t | 164 +++ t/op/vec.t | 253 ++++ t/op/ver.t | 271 ++++ t/op/waitpid.t | 39 + t/op/wantarray.t | 80 ++ t/op/warn.t | 241 ++++ t/op/while.t | 223 ++++ t/op/write.t | 2217 ++++++++++++++++++++++++++++++++ t/op/yadayada.t | 94 ++ t/opbasic/arith.t | 493 +++++++ t/opbasic/cmp.t | 317 +++++ t/opbasic/concat.t | 863 +++++++++++++ t/opbasic/magic_phase.t | 49 + t/opbasic/qq.t | 76 ++ t/perf/benchmarks.t | 78 ++ t/perf/opcount.t | 665 ++++++++++ t/perf/optree.t | 453 +++++++ t/perf/speed.t | 51 + t/perf/taint.t | 61 + t/run/cloexec.t | 157 +++ t/run/dtrace.pl | 1 + t/run/dtrace.t | 197 +++ t/run/exit.t | 168 +++ t/run/flib/broken.pm | 8 + t/run/fresh_perl.t | 854 ++++++++++++ t/run/locale.t | 513 ++++++++ t/run/noswitch.t | 16 + t/run/runenv.t | 354 +++++ t/run/script.t | 28 + t/run/switch0.t | 11 + t/run/switchC.t | 119 ++ t/run/switchDx.t | 50 + t/run/switchF.t | 16 + t/run/switchF1.t | 37 + t/run/switchF2.t | 26 + t/run/switchI.t | 30 + t/run/switchM.t | 46 + t/run/switcha.t | 15 + t/run/switchd-78586.t | 46 + t/run/switchd.t | 329 +++++ t/run/switches.t | 701 ++++++++++ t/run/switchn.t | 22 + t/run/switchp.t | 19 + t/run/switcht.t | 66 + t/run/switchx.aux | 31 + t/run/switchx.t | 36 + t/run/switchx2.aux | 32 + t/run/switchx3.aux | 2 + t/uni/attrs.t | 195 +++ t/uni/bless.t | 124 ++ t/uni/cache.t | 35 + t/uni/caller.t | 76 ++ t/uni/chomp.t | 49 + t/uni/class.t | 109 ++ t/uni/eval.t | 43 + t/uni/fold.t | 513 ++++++++ t/uni/goto.t | 42 + t/uni/greek.t | 102 ++ t/uni/gv.t | 842 ++++++++++++ t/uni/labels.t | 86 ++ t/uni/latin2.t | 136 ++ t/uni/lex_utf8.t | 94 ++ t/uni/lower.t | 18 + t/uni/method.t | 215 ++++ t/uni/opcroak.t | 46 + t/uni/overload.t | 312 +++++ t/uni/package.t | 112 ++ t/uni/parser.t | 284 ++++ t/uni/readline.t | 69 + t/uni/select.t | 35 + t/uni/sprintf.t | 155 +++ t/uni/stash.t | 290 +++++ t/uni/tie.t | 60 + t/uni/title.t | 16 + t/uni/tr_utf8.t | 56 + t/uni/universal.t | 162 +++ t/uni/upper.t | 20 + t/uni/variables.t | 409 ++++++ t/uni/write.t | 123 ++ 369 files changed, 88616 insertions(+) create mode 100644 t/base/cond.t create mode 100644 t/base/if.t create mode 100644 t/base/lex.t create mode 100644 t/base/num.t create mode 100644 t/base/pat.t create mode 100644 t/base/rs.t create mode 100644 t/base/term.t create mode 100644 t/base/translate.t create mode 100644 t/base/while.t create mode 100644 t/cmd/elsif.t create mode 100644 t/cmd/for.t create mode 100644 t/cmd/mod.t create mode 100644 t/cmd/subval.t create mode 100644 t/cmd/switch.t create mode 100644 t/comp/bproto.t create mode 100644 t/comp/cmdopt.t create mode 100644 t/comp/colon.t create mode 100644 t/comp/decl.t create mode 100644 t/comp/filter_exception.t create mode 100644 t/comp/final_line_num.t create mode 100644 t/comp/fold.t create mode 100644 t/comp/form_scope.t create mode 100644 t/comp/hints.t create mode 100644 t/comp/line_debug.t create mode 100644 t/comp/multiline.t create mode 100644 t/comp/opsubs.t create mode 100644 t/comp/our.t create mode 100644 t/comp/package.t create mode 100644 t/comp/package_block.t create mode 100644 t/comp/parser.t create mode 100644 t/comp/parser_run.t create mode 100644 t/comp/proto.t create mode 100644 t/comp/redef.t create mode 100644 t/comp/require.t create mode 100644 t/comp/retainedlines.t create mode 100644 t/comp/term.t create mode 100644 t/comp/uproto.t create mode 100644 t/comp/use.t create mode 100644 t/comp/utf.t create mode 100644 t/io/argv.t create mode 100644 t/io/binmode.t create mode 100644 t/io/bom.t create mode 100644 t/io/closepid.t create mode 100644 t/io/crlf.t create mode 100644 t/io/crlf_through.t create mode 100644 t/io/data.t create mode 100644 t/io/defout.t create mode 100644 t/io/dup.t create mode 100644 t/io/eintr.t create mode 100644 t/io/eintr_print.t create mode 100644 t/io/errno.t create mode 100644 t/io/errnosig.t create mode 100644 t/io/fflush.t create mode 100644 t/io/fs.t create mode 100644 t/io/getcwd.t create mode 100644 t/io/inplace.t create mode 100644 t/io/iofile.t create mode 100644 t/io/iprefix.t create mode 100644 t/io/layers.t create mode 100644 t/io/nargv.t create mode 100644 t/io/open.t create mode 100644 t/io/openpid.t create mode 100644 t/io/paragraph_mode.t create mode 100644 t/io/perlio.t create mode 100644 t/io/perlio_fail.t create mode 100644 t/io/perlio_leaks.t create mode 100644 t/io/perlio_open.t create mode 100644 t/io/pipe.t create mode 100644 t/io/print.t create mode 100644 t/io/pvbm.t create mode 100644 t/io/read.t create mode 100644 t/io/say.t create mode 100644 t/io/sem.t create mode 100644 t/io/semctl.t create mode 100644 t/io/shm.t create mode 100644 t/io/socket.t create mode 100644 t/io/socketpair.t create mode 100644 t/io/tell.t create mode 100644 t/io/through.t create mode 100644 t/io/utf8.t create mode 100644 t/lib/Count.pm create mode 100644 t/lib/Devel/nodb.pm create mode 100644 t/lib/Devel/switchd.pm create mode 100644 t/lib/Devel/switchd_empty.pm create mode 100644 t/lib/Devel/switchd_goto.pm create mode 100644 t/lib/test_require.pm create mode 100644 t/lib/test_use.pm create mode 100644 t/lib/test_use_14937.pm create mode 100644 t/op/64bitint.t create mode 100644 t/op/aassign.t create mode 100644 t/op/alarm.t create mode 100644 t/op/anonconst.t create mode 100644 t/op/anonsub.t create mode 100644 t/op/append.t create mode 100644 t/op/args.t create mode 100644 t/op/array.t create mode 100644 t/op/assignwarn.t create mode 100644 t/op/attrhand.t create mode 100644 t/op/attrproto.t create mode 100644 t/op/attrs.t create mode 100644 t/op/auto.t create mode 100644 t/op/avhv.t create mode 100644 t/op/bless.t create mode 100644 t/op/blocks.t create mode 100644 t/op/bop.t create mode 100644 t/op/caller.pl create mode 100644 t/op/caller.t create mode 100644 t/op/catch.t create mode 100644 t/op/chars.t create mode 100644 t/op/chdir.t create mode 100644 t/op/chop.t create mode 100644 t/op/chr.t create mode 100644 t/op/closure.t create mode 100644 t/op/closure_test.pl create mode 100644 t/op/concat2.t create mode 100644 t/op/cond.t create mode 100644 t/op/const-optree.t create mode 100644 t/op/context.t create mode 100644 t/op/coreamp.t create mode 100644 t/op/coresubs.t create mode 100644 t/op/cproto.t create mode 100644 t/op/crypt.t create mode 100644 t/op/current_sub.t create mode 100644 t/op/dbm.t create mode 100644 t/op/decl-refs.t create mode 100644 t/op/defined.t create mode 100644 t/op/defins.t create mode 100644 t/op/delete.t create mode 100644 t/op/die.t create mode 100644 t/op/die_except.t create mode 100644 t/op/die_exit.t create mode 100644 t/op/die_keeperr.t create mode 100644 t/op/die_unwind.t create mode 100644 t/op/do.t create mode 100644 t/op/dor.t create mode 100644 t/op/dump.t create mode 100644 t/op/each.t create mode 100644 t/op/each_array.t create mode 100644 t/op/eval.t create mode 100644 t/op/evalbytes.t create mode 100644 t/op/exec.t create mode 100644 t/op/exists_sub.t create mode 100644 t/op/exp.t create mode 100644 t/op/fh.t create mode 100644 t/op/filehandle.t create mode 100644 t/op/filetest.t create mode 100644 t/op/filetest_stack_ok.t create mode 100644 t/op/filetest_t.t create mode 100644 t/op/flip.t create mode 100644 t/op/for.t create mode 100644 t/op/fork.t create mode 100644 t/op/fresh_perl_utf8.t create mode 100644 t/op/getpid.t create mode 100644 t/op/getppid.t create mode 100644 t/op/glob.t create mode 100644 t/op/gmagic.t create mode 100644 t/op/goto.t create mode 100644 t/op/goto_xs.t create mode 100644 t/op/grent.t create mode 100644 t/op/grep.t create mode 100644 t/op/groups.t create mode 100644 t/op/gv.t create mode 100644 t/op/hash-rt85026.t create mode 100644 t/op/hash.t create mode 100644 t/op/hashassign.t create mode 100644 t/op/hashwarn.t create mode 100644 t/op/heredoc.t create mode 100644 t/op/hexfp.t create mode 100644 t/op/inc.t create mode 100644 t/op/inccode-tie.t create mode 100644 t/op/inccode.t create mode 100644 t/op/incfilter.t create mode 100644 t/op/index.t create mode 100644 t/op/index_thr.t create mode 100644 t/op/infnan.t create mode 100644 t/op/int.t create mode 100644 t/op/join.t create mode 100644 t/op/kill0.t create mode 100644 t/op/kvaslice.t create mode 100644 t/op/kvhslice.t create mode 100644 t/op/lc.t create mode 100644 t/op/leaky-magic.t create mode 100644 t/op/length.t create mode 100644 t/op/lex.t create mode 100644 t/op/lex_assign.t create mode 100644 t/op/lexsub.t create mode 100644 t/op/lfs.t create mode 100644 t/op/list.t create mode 100644 t/op/local.t create mode 100644 t/op/localref.t create mode 100644 t/op/lock.t create mode 100644 t/op/loopctl.t create mode 100644 t/op/lop.t create mode 100644 t/op/lvref.t create mode 100644 t/op/magic-27839.t create mode 100644 t/op/magic.t create mode 100644 t/op/method.t create mode 100644 t/op/mkdir.t create mode 100644 t/op/multideref.t create mode 100644 t/op/my.t create mode 100644 t/op/my_stash.t create mode 100644 t/op/mydef.t create mode 100644 t/op/negate.t create mode 100644 t/op/not.t create mode 100644 t/op/numconvert.t create mode 100644 t/op/oct.t create mode 100644 t/op/or.t create mode 100644 t/op/ord.t create mode 100644 t/op/overload_integer.t create mode 100644 t/op/override.t create mode 100644 t/op/pack.t create mode 100644 t/op/packagev.t create mode 100644 t/op/pos.t create mode 100644 t/op/postfixderef.t create mode 100644 t/op/pow.t create mode 100644 t/op/print.t create mode 100644 t/op/protowarn.t create mode 100644 t/op/push.t create mode 100644 t/op/pwent.t create mode 100644 t/op/qr.t create mode 100644 t/op/quotemeta.t create mode 100644 t/op/rand.t create mode 100644 t/op/range.t create mode 100644 t/op/read.t create mode 100644 t/op/readdir.t create mode 100644 t/op/readline.t create mode 100644 t/op/recurse.t create mode 100644 t/op/ref.t create mode 100644 t/op/repeat.t create mode 100644 t/op/require_37033.t create mode 100644 t/op/require_errors.t create mode 100644 t/op/require_override.t create mode 100644 t/op/reset.t create mode 100644 t/op/reverse.t create mode 100644 t/op/rt119311.t create mode 100644 t/op/runlevel.t create mode 100644 t/op/select.t create mode 100644 t/op/setpgrpstack.t create mode 100644 t/op/sigdispatch.t create mode 100644 t/op/signatures.t create mode 100644 t/op/sigsystem.t create mode 100644 t/op/sleep.t create mode 100644 t/op/smartkve.t create mode 100644 t/op/smartmatch.t create mode 100644 t/op/sort.t create mode 100644 t/op/splice.t create mode 100644 t/op/split.t create mode 100644 t/op/split_unicode.t create mode 100644 t/op/sprintf.t create mode 100644 t/op/sprintf2.t create mode 100644 t/op/srand.t create mode 100644 t/op/sselect.t create mode 100644 t/op/stash.t create mode 100644 t/op/stash_parse_gv.t create mode 100644 t/op/stat.t create mode 100644 t/op/stat_errors.t create mode 100644 t/op/state.t create mode 100644 t/op/study.t create mode 100644 t/op/studytied.t create mode 100644 t/op/sub.t create mode 100644 t/op/sub_lval.t create mode 100644 t/op/substr.t create mode 100644 t/op/substr_thr.t create mode 100644 t/op/svleak.pl create mode 100644 t/op/svleak.t create mode 100644 t/op/switch.t create mode 100644 t/op/symbolcache.t create mode 100644 t/op/sysio.t create mode 100644 t/op/taint.t create mode 100644 t/op/threads-dirh.t create mode 100644 t/op/threads.t create mode 100644 t/op/threads_create.pl create mode 100644 t/op/tie.t create mode 100644 t/op/tie_fetch_count.t create mode 100644 t/op/tiearray.t create mode 100644 t/op/tiehandle.t create mode 100644 t/op/time.t create mode 100644 t/op/time_loop.t create mode 100644 t/op/tr.t create mode 100644 t/op/tr_latin1.t create mode 100644 t/op/undef.t create mode 100644 t/op/universal.t create mode 100644 t/op/unlink.t create mode 100644 t/op/unshift.t create mode 100644 t/op/upgrade.t create mode 100644 t/op/utf8cache.t create mode 100644 t/op/utf8decode.t create mode 100644 t/op/utf8magic.t create mode 100644 t/op/utfhash.t create mode 100644 t/op/utftaint.t create mode 100644 t/op/vec.t create mode 100644 t/op/ver.t create mode 100644 t/op/waitpid.t create mode 100644 t/op/wantarray.t create mode 100644 t/op/warn.t create mode 100644 t/op/while.t create mode 100644 t/op/write.t create mode 100644 t/op/yadayada.t create mode 100644 t/opbasic/arith.t create mode 100644 t/opbasic/cmp.t create mode 100644 t/opbasic/concat.t create mode 100644 t/opbasic/magic_phase.t create mode 100644 t/opbasic/qq.t create mode 100644 t/perf/benchmarks.t create mode 100644 t/perf/opcount.t create mode 100644 t/perf/optree.t create mode 100644 t/perf/speed.t create mode 100644 t/perf/taint.t create mode 100644 t/run/cloexec.t create mode 100644 t/run/dtrace.pl create mode 100644 t/run/dtrace.t create mode 100644 t/run/exit.t create mode 100644 t/run/flib/broken.pm create mode 100644 t/run/fresh_perl.t create mode 100644 t/run/locale.t create mode 100644 t/run/noswitch.t create mode 100644 t/run/runenv.t create mode 100644 t/run/script.t create mode 100644 t/run/switch0.t create mode 100644 t/run/switchC.t create mode 100644 t/run/switchDx.t create mode 100644 t/run/switchF.t create mode 100644 t/run/switchF1.t create mode 100644 t/run/switchF2.t create mode 100644 t/run/switchI.t create mode 100644 t/run/switchM.t create mode 100644 t/run/switcha.t create mode 100644 t/run/switchd-78586.t create mode 100644 t/run/switchd.t create mode 100644 t/run/switches.t create mode 100644 t/run/switchn.t create mode 100644 t/run/switchp.t create mode 100644 t/run/switcht.t create mode 100644 t/run/switchx.aux create mode 100644 t/run/switchx.t create mode 100644 t/run/switchx2.aux create mode 100644 t/run/switchx3.aux create mode 100644 t/uni/attrs.t create mode 100644 t/uni/bless.t create mode 100644 t/uni/cache.t create mode 100644 t/uni/caller.t create mode 100644 t/uni/chomp.t create mode 100644 t/uni/class.t create mode 100644 t/uni/eval.t create mode 100644 t/uni/fold.t create mode 100644 t/uni/goto.t create mode 100644 t/uni/greek.t create mode 100644 t/uni/gv.t create mode 100644 t/uni/labels.t create mode 100644 t/uni/latin2.t create mode 100644 t/uni/lex_utf8.t create mode 100644 t/uni/lower.t create mode 100644 t/uni/method.t create mode 100644 t/uni/opcroak.t create mode 100644 t/uni/overload.t create mode 100644 t/uni/package.t create mode 100644 t/uni/parser.t create mode 100644 t/uni/readline.t create mode 100644 t/uni/select.t create mode 100644 t/uni/sprintf.t create mode 100644 t/uni/stash.t create mode 100644 t/uni/tie.t create mode 100644 t/uni/title.t create mode 100644 t/uni/tr_utf8.t create mode 100644 t/uni/universal.t create mode 100644 t/uni/upper.t create mode 100644 t/uni/variables.t create mode 100644 t/uni/write.t diff --git a/MANIFEST b/MANIFEST index f47fbc779b..729a418d05 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3321,3 +3321,407 @@ t/re/uniprops01.t t/re/uniprops02.t t/re/uniprops03.t t/re/uniprops04.t +t/base/cond.t +t/base/if.t +t/base/lex.t +t/base/num.t +t/base/pat.t +t/base/rs.t +t/base/term.t +t/base/translate.t +t/base/while.t +t/comp/bproto.t +t/comp/cmdopt.t +t/comp/colon.t +t/comp/decl.t +t/comp/filter_exception.t +t/comp/final_line_num.t +t/comp/fold.t +t/comp/form_scope.t +t/comp/hints.aux +t/comp/hints.t +t/comp/line_debug_0.aux +t/comp/line_debug.t +t/comp/multiline.t +t/comp/opsubs.t +t/comp/our.t +t/comp/package_block.t +t/comp/package.t +t/comp/parser_run.t +t/comp/parser.t +t/comp/proto.t +t/comp/redef.t +t/comp/require.t +t/comp/retainedlines.t +t/comp/term.t +t/comp/uproto.t +t/comp/use.t +t/comp/utf.t +t/base/cond.t +t/base/if.t +t/base/lex.t +t/base/num.t +t/base/pat.t +t/base/rs.t +t/base/term.t +t/base/translate.t +t/base/while.t +t/cmd/elsif.t +t/cmd/for.t +t/cmd/mod.t +t/cmd/subval.t +t/cmd/switch.t +t/comp/bproto.t +t/comp/cmdopt.t +t/comp/colon.t +t/comp/decl.t +t/comp/filter_exception.t +t/comp/final_line_num.t +t/comp/fold.t +t/comp/form_scope.t +t/comp/hints.t +t/comp/line_debug.t +t/comp/multiline.t +t/comp/opsubs.t +t/comp/our.t +t/comp/package.t +t/comp/package_block.t +t/comp/parser.t +t/comp/parser_run.t +t/comp/proto.t +t/comp/redef.t +t/comp/require.t +t/comp/retainedlines.t +t/comp/term.t +t/comp/uproto.t +t/comp/use.t +t/comp/utf.t +t/io/argv.t +t/io/binmode.t +t/io/bom.t +t/io/closepid.t +t/io/crlf.t +t/io/crlf_through.t +t/io/data.t +t/io/defout.t +t/io/dup.t +t/io/eintr.t +t/io/eintr_print.t +t/io/errno.t +t/io/errnosig.t +t/io/fflush.t +t/io/fs.t +t/io/getcwd.t +t/io/inplace.t +t/io/iofile.t +t/io/iprefix.t +t/io/layers.t +t/io/nargv.t +t/io/open.t +t/io/openpid.t +t/io/paragraph_mode.t +t/io/perlio.t +t/io/perlio_fail.t +t/io/perlio_leaks.t +t/io/perlio_open.t +t/io/pipe.t +t/io/print.t +t/io/pvbm.t +t/io/read.t +t/io/say.t +t/io/sem.t +t/io/semctl.t +t/io/shm.t +t/io/socket.t +t/io/socketpair.t +t/io/tell.t +t/io/through.t +t/io/utf8.t +t/lib/Devel/nodb.pm +t/lib/Devel/switchd.pm +t/lib/Devel/switchd_empty.pm +t/lib/Devel/switchd_goto.pm +t/lib/test_require.pm +t/lib/test_use.pm +t/lib/test_use_14937.pm +t/op/64bitint.t +t/op/aassign.t +t/op/alarm.t +t/op/anonconst.t +t/op/anonsub.t +t/op/append.t +t/op/args.t +t/op/array.t +t/op/assignwarn.t +t/op/attrhand.t +t/op/attrproto.t +t/op/attrs.t +t/op/auto.t +t/op/avhv.t +t/op/bless.t +t/op/blocks.t +t/op/bop.t +t/op/caller.pl +t/op/caller.t +t/op/catch.t +t/op/chars.t +t/op/chdir.t +t/op/chop.t +t/op/chr.t +t/op/closure.t +t/op/closure_test.pl +t/op/concat2.t +t/op/cond.t +t/op/const-optree.t +t/op/context.t +t/op/coreamp.t +t/op/coresubs.t +t/op/cproto.t +t/op/crypt.t +t/op/current_sub.t +t/op/dbm.t +t/op/decl-refs.t +t/op/defined.t +t/op/defins.t +t/op/delete.t +t/op/die.t +t/op/die_except.t +t/op/die_exit.t +t/op/die_keeperr.t +t/op/die_unwind.t +t/op/do.t +t/op/dor.t +t/op/dump.t +t/op/each.t +t/op/each_array.t +t/op/eval.t +t/op/evalbytes.t +t/op/exec.t +t/op/exists_sub.t +t/op/exp.t +t/op/fh.t +t/op/filehandle.t +t/op/filetest.t +t/op/filetest_stack_ok.t +t/op/filetest_t.t +t/op/flip.t +t/op/for.t +t/op/fork.t +t/op/fresh_perl_utf8.t +t/op/getpid.t +t/op/getppid.t +t/op/glob.t +t/op/gmagic.t +t/op/goto.t +t/op/goto_xs.t +t/op/grent.t +t/op/grep.t +t/op/groups.t +t/op/gv.t +t/op/hash-rt85026.t +t/op/hash.t +t/op/hashassign.t +t/op/hashwarn.t +t/op/heredoc.t +t/op/hexfp.t +t/op/inc.t +t/op/inccode-tie.t +t/op/inccode.t +t/op/incfilter.t +t/op/index.t +t/op/index_thr.t +t/op/infnan.t +t/op/int.t +t/op/join.t +t/op/kill0.t +t/op/kvaslice.t +t/op/kvhslice.t +t/op/lc.t +t/op/leaky-magic.t +t/op/length.t +t/op/lex.t +t/op/lex_assign.t +t/op/lexsub.t +t/op/lfs.t +t/op/list.t +t/op/local.t +t/op/localref.t +t/op/lock.t +t/op/loopctl.t +t/op/lop.t +t/op/lvref.t +t/op/magic-27839.t +t/op/magic.t +t/op/method.t +t/op/mkdir.t +t/op/multideref.t +t/op/my.t +t/op/my_stash.t +t/op/mydef.t +t/op/negate.t +t/op/not.t +t/op/numconvert.t +t/op/oct.t +t/op/or.t +t/op/ord.t +t/op/overload_integer.t +t/op/override.t +t/op/pack.t +t/op/packagev.t +t/op/pos.t +t/op/postfixderef.t +t/op/pow.t +t/op/print.t +t/op/protowarn.t +t/op/push.t +t/op/pwent.t +t/op/qr.t +t/op/quotemeta.t +t/op/rand.t +t/op/range.t +t/op/read.t +t/op/readdir.t +t/op/readline.t +t/op/recurse.t +t/op/ref.t +t/op/repeat.t +t/op/require_37033.t +t/op/require_errors.t +t/op/require_override.t +t/op/reset.t +t/op/reverse.t +t/op/rt119311.t +t/op/runlevel.t +t/op/select.t +t/op/setpgrpstack.t +t/op/sigdispatch.t +t/op/signatures.t +t/op/sigsystem.t +t/op/sleep.t +t/op/smartkve.t +t/op/smartmatch.t +t/op/sort.t +t/op/splice.t +t/op/split.t +t/op/split_unicode.t +t/op/sprintf.t +t/op/sprintf2.t +t/op/srand.t +t/op/sselect.t +t/op/stash.t +t/op/stash_parse_gv.t +t/op/stat.t +t/op/stat_errors.t +t/op/state.t +t/op/study.t +t/op/studytied.t +t/op/sub.t +t/op/sub_lval.t +t/op/substr.t +t/op/substr_thr.t +t/op/svleak.pl +t/op/svleak.t +t/op/switch.t +t/op/symbolcache.t +t/op/sysio.t +t/op/taint.t +t/op/threads-dirh.t +t/op/threads.t +t/op/threads_create.pl +t/op/tie.t +t/op/tie_fetch_count.t +t/op/tiearray.t +t/op/tiehandle.t +t/op/time.t +t/op/time_loop.t +t/op/tr.t +t/op/tr_latin1.t +t/op/undef.t +t/op/universal.t +t/op/unlink.t +t/op/unshift.t +t/op/upgrade.t +t/op/utf8cache.t +t/op/utf8decode.t +t/op/utf8magic.t +t/op/utfhash.t +t/op/utftaint.t +t/op/vec.t +t/op/ver.t +t/op/waitpid.t +t/op/wantarray.t +t/op/warn.t +t/op/while.t +t/op/write.t +t/op/yadayada.t +t/opbasic/arith.t +t/opbasic/cmp.t +t/opbasic/concat.t +t/opbasic/magic_phase.t +t/opbasic/qq.t +t/perf/benchmarks.t +t/perf/opcount.t +t/perf/optree.t +t/perf/speed.t +t/perf/taint.t +t/run/cloexec.t +t/run/dtrace.pl +t/run/dtrace.t +t/run/exit.t +t/run/flib/broken.pm +t/run/fresh_perl.t +t/run/locale.t +t/run/noswitch.t +t/run/runenv.t +t/run/script.t +t/run/switch0.t +t/run/switchC.t +t/run/switchDx.t +t/run/switchF.t +t/run/switchF1.t +t/run/switchF2.t +t/run/switchI.t +t/run/switchM.t +t/run/switcha.t +t/run/switchd-78586.t +t/run/switchd.t +t/run/switches.t +t/run/switchn.t +t/run/switchp.t +t/run/switcht.t +t/run/switchx.aux +t/run/switchx.t +t/run/switchx2.aux +t/run/switchx3.aux +t/uni/attrs.t +t/uni/bless.t +t/uni/cache.t +t/uni/caller.t +t/uni/chomp.t +t/uni/class.t +t/uni/eval.t +t/uni/fold.t +t/uni/goto.t +t/uni/greek.t +t/uni/gv.t +t/uni/labels.t +t/uni/latin2.t +t/uni/lex_utf8.t +t/uni/lower.t +t/uni/method.t +t/uni/opcroak.t +t/uni/overload.t +t/uni/package.t +t/uni/parser.t +t/uni/readline.t +t/uni/select.t +t/uni/sprintf.t +t/uni/stash.t +t/uni/tie.t +t/uni/title.t +t/uni/tr_utf8.t +t/uni/universal.t +t/uni/upper.t +t/uni/variables.t +t/uni/write.t +t/lib/Count.pm diff --git a/t/base/cond.t b/t/base/cond.t new file mode 100644 index 0000000000..e2ef358f9a --- /dev/null +++ b/t/base/cond.t @@ -0,0 +1,17 @@ +#!./perl + +# make sure conditional operators work + +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 == $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"); diff --git a/t/base/if.t b/t/base/if.t new file mode 100644 index 0000000000..f093b0d580 --- /dev/null +++ b/t/base/if.t @@ -0,0 +1,9 @@ +#!./perl + +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";} diff --git a/t/base/lex.t b/t/base/lex.t new file mode 100644 index 0000000000..414aa1fceb --- /dev/null +++ b/t/base/lex.t @@ -0,0 +1,588 @@ +#!./perl + +print "1..120\n"; + +$x = 'x'; + +print "#1 :$x: eq :x:\n"; +if ($x eq 'x') {print "ok 1\n";} else {print "not ok 1\n";} + +$x = $#[0]; + +if ($x eq '') {print "ok 2\n";} else {print "not ok 2\n";} + +$x = $#x; + +if ($x eq '-1') {print "ok 3\n";} else {print "not ok 3\n";} + +$x = '\\'; # '; + +if (length($x) == 1) {print "ok 4\n";} else {print "not ok 4\n";} + +eval 'while (0) { + print "foo\n"; +} +/^/ && (print "ok 5\n"); +'; + +eval '$foo{1} / 1;'; +if (!$@) {print "ok 6\n";} else {print "not ok 6 $@\n";} + +eval '$foo = 123+123.4+123e4+123.4E5+123.4e+5+.12;'; + +$foo = int($foo * 100 + .5); +if ($foo eq 2591024652) {print "ok 7\n";} else {print "not ok 7 :$foo:\n";} + +print <<'EOF'; +ok 8 +EOF + +$foo = 'ok 9'; +print <<EOF; +$foo +EOF + +eval <<\EOE, print $@; +print <<'EOF'; +ok 10 +EOF + +$foo = 'ok 11'; +print <<EOF; +$foo +EOF +EOE + +print <<'EOS' . <<\EOF; +ok 12 - make sure single quotes are honored \nnot ok +EOS +ok 13 +EOF + +print qq/ok 14\n/; +print qq(ok 15\n); + +print qq +[ok 16\n] +; + +print q<ok 17 +>; + +print "ok 18 - was the test for the deprecated use of bare << to mean <<\"\"\n"; +#print <<; # Yow! +#ok 18 +# +## previous line intentionally left blank. + +print <<E1 eq "foo\n\n" ? "ok 19\n" : "not ok 19\n"; +@{[ <<E2 ]} +foo +E2 +E1 + +print <<E1 eq "foo\n\n" ? "ok 20\n" : "not ok 20\n"; +@{[ + <<E2 +foo +E2 +]} +E1 + +$foo = FOO; +$bar = BAR; +$foo{$bar} = BAZ; +$ary[0] = ABC; + +print "$foo{$bar}" eq "BAZ" ? "ok 21\n" : "not ok 21\n"; + +print "${foo}{$bar}" eq "FOO{BAR}" ? "ok 22\n" : "not ok 22\n"; +print "${foo{$bar}}" eq "BAZ" ? "ok 23\n" : "not ok 23\n"; + +print "FOO:" =~ /$foo[:]/ ? "ok 24\n" : "not ok 24\n"; +print "ABC" =~ /^$ary[$A]$/ ? "ok 25\n" : "not ok 25\n"; +print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 26\n" : "not ok 26\n"; + +# MJD 19980425 +($X, @X) = qw(a b c d); +print "d" =~ /^$X[-1]$/ ? "ok 27\n" : "not ok 27\n"; +print "a1" !~ /^$X[-1]$/ ? "ok 28\n" : "not ok 28\n"; + +print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n"); + + +$foo = "not ok 30\n"; +$foo =~ s/^not /substr(<<EOF, 0, 0)/e; + Ignored +EOF +print $foo; + +# Tests for new extended control-character variables +# MJD 19990227 + +my $test = 31; + +{ my $CX = "\cX"; + my $CXY ="\cXY"; + $ {$CX} = 17; + $ {$CXY} = 23; + if ($ {^XY} != 23) { print "not " } + print "ok $test\n"; $test++; + +# Does the old UNBRACED syntax still do what it used to? + if ("$^XY" ne "17Y") { print "not " } + print "ok $test\n"; $test++; + + sub XX () { 6 } + $ {"\cQ\cXX"} = 119; + $^Q = 5; # This should be an unused ^Var. + $N = 5; + # The second caret here should be interpreted as an xor + if (($^Q^XX) != 3) { print "not " } + print "ok $test\n"; $test++; + + # These next two tests are trying to make sure that + # $^FOO is always global; it doesn't make sense to 'my' it. + # + + eval 'my $^X;'; + print "not " unless index ($@, 'Can\'t use global $^X in "my"') > -1; + print "ok $test\n"; $test++; +# print "($@)\n" if $@; + + eval 'my $ {^XYZ};'; + print "not " unless index ($@, 'Can\'t use global $^XYZ in "my"') > -1; + print "ok $test\n"; $test++; +# print "($@)\n" if $@; +# + ${^TEST}= "splat"; + @{^TEST}= ("foo", "bar"); + %{^TEST}= ("foo" => "FOO", "bar" => "BAR" ); + + print "not " if "${^TEST}" ne "splat"; + print "ok $test\n"; $test++; + + print "not " if "${ ^TEST }" ne "splat"; + print "ok $test\n"; $test++; + + print "not " if "${^TEST}[0]" ne "splat[0]"; + print "ok $test\n"; $test++; + + print "not " if "${^TEST[0]}" ne "foo"; + print "ok $test\n"; $test++; + + print "not " if "${ ^TEST [1] }" ne "bar"; + print "ok $test\n"; $test++; + + print "not " if "${^TEST}{foo}" ne "splat{foo}"; + print "ok $test\n"; $test++; + + print "not " if "${^TEST{foo}}" ne "FOO"; + print "ok $test\n"; $test++; + + print "not " if "${ ^TEST {bar} }" ne "BAR"; + print "ok $test\n"; $test++; + + +# Now let's make sure that caret variables are all forced into the main package. + package Someother; + $^Q = 'Someother'; + $ {^Quixote} = 'Someother 2'; + $ {^M} = 'Someother 3'; + package main; + print "not " unless $^Q eq 'Someother'; + print "ok $test\n"; $test++; + print "not " unless $ {^Quixote} eq 'Someother 2'; + print "ok $test\n"; $test++; + print "not " unless $ {^M} eq 'Someother 3'; + print "ok $test\n"; $test++; + + +} + +# see if eval '', s///e, and heredocs mix + +sub T { + my ($where, $num) = @_; + my ($p,$f,$l) = caller; + print "# $p:$f:$l vs /$where/\nnot " unless "$p:$f:$l" =~ /$where/; + print "ok $num\n"; +} + +{ +# line 42 "plink" + local $_ = "not ok "; + eval q{ + s/^not /<<EOT/e and T '^main:\(eval \d+\):2$', $test++; +# uggedaboudit +EOT + print $_, $test++, "\n"; + T('^main:\(eval \d+\):6$', $test++); +# line 1 "plunk" + T('^main:plunk:1$', $test++); + }; + print "# $@\nnot ok $test\n" if $@; + T '^main:plink:53$', $test++; +} + +# tests 47--51 start here +# tests for new array interpolation semantics: +# arrays now *always* interpolate into "..." strings. +# 20000522 MJD ([email protected]) +{ + eval(q(">@nosuch<" eq "><")) || print "# $@", "not "; + print "ok $test\n"; + ++$test; + + # Look at this! This is going to be a common error in the future: + eval(q("[email protected]" eq "fred.com")) || print "# $@", "not "; + print "ok $test\n"; + ++$test; + + # Let's make sure that normal array interpolation still works right + # For some reason, this appears not to be tested anywhere else. + my @a = (1,2,3); + print +((">@a<" eq ">1 2 3<") ? '' : 'not '), "ok $test\n"; + ++$test; + + # Ditto. + eval(q{@nosuch = ('a', 'b', 'c'); ">@nosuch<" eq ">a b c<"}) + || print "# $@", "not "; + print "ok $test\n"; + ++$test; + + # This isn't actually a lex test, but it's testing the same feature + sub makearray { + my @array = ('fish', 'dog', 'carrot'); + *R::crackers = \@array; + } + + eval(q{makearray(); ">@R::crackers<" eq ">fish dog carrot<"}) + || print "# $@", "not "; + print "ok $test\n"; + ++$test; +} + +# Tests 52-54 +# => should only quote foo::bar if it isn't a real sub. AMS, 20010621 + +sub xyz::foo { "bar" } +my %str = ( + foo => 1, + xyz::foo => 1, + xyz::bar => 1, +); + +print ((exists $str{foo} ? "" : "not ")."ok $test\n"); ++$test; +print ((exists $str{bar} ? "" : "not ")."ok $test\n"); ++$test; +print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test; + +sub foo::::::bar { print "ok $test\n"; $test++ } +foo::::::bar; + +# \xDF is a non-ASCII alpha on both ASCII and EBCDIC. +eval "\$x =\xDFfoo"; +if ($@ =~ /Unrecognized character \\xDF; marked by <-- HERE after \$x =<-- HERE near column 5/) { print "ok $test\n"; } else { print "not ok $test\n"; } +$test++; + +# Is "[~" scanned correctly? +@a = (1,2,3); +print "not " unless($a[~~2] == 3); +print "ok $test\n"; $test++; + +$_ = ""; +eval 's/(?:)/"ok $test" . "${\q||}".<<\END/e; + - heredoc after "" in s/// in eval +END +'; +print $_ || "not ok $test\n"; $test++; + +$_ = ""; +eval 's|(?:)|"ok $test" . "${\<<\END}" + - heredoc in "" in multiline s///e in eval +END +|e +'; +print $_ || "not ok $test\n"; $test++; + +$_ = ""; +eval "s/(?:)/<<foo/e #\0 +ok $test - null on same line as heredoc in s/// in eval +foo +"; +print $_ || "not ok $test\n"; $test++; + +$_ = ""; +eval ' s/(?:)/"${\<<END}"/e; +ok $test - heredoc in "" in single-line s///e in eval +END +'; +print $_ || "not ok $test\n"; $test++; + +$_ = ""; +s|(?:)|"${\<<END}" +ok $test - heredoc in "" in multiline s///e outside eval +END +|e; +print $_ || "not ok $test\n"; $test++; + +$_ = "not ok $test - s/// in s/// pattern\n"; +s/${s|||;\""}not //; +print; $test++; + +/(?{print <<END +ok $test - here-doc in re-eval +END +})/; $test++; + +eval '/(?{print <<END +ok $test - here-doc in re-eval in string eval +END +})/'; $test++; + +eval 'print qq ;ok $test - eval ending with semicolon\n;' + or print "not ok $test - eval ending with semicolon\n"; $test++; + +print "not " unless qr/(?{<<END})/ eq '(?^:(?{<<END}))'; +foo +END +print "ok $test - here-doc in single-line re-eval\n"; $test++; + +$_ = qr/(?{"${<<END}" +foo +END +})/; +print "not " unless /foo/; +print "ok $test - here-doc in quotes in multiline re-eval\n"; $test++; + +eval 's//<<END/e if 0; $_ = "a +END +b"'; +print "not " if $_ =~ /\n\n/; +print "ok $test - eval 's//<<END/' does not leave extra newlines\n"; $test++; + +$_ = a; +eval "s/a/'b\0'#/e"; +print 'not ' unless $_ eq "b\0"; +print "ok $test - # after null in s/// repl\n"; $test++; + +s//"#" . <<END/e; +foo +END +print "ok $test - s//'#' . <<END/e\n"; $test++; + +eval "s//3}->{3/e"; +print "not " unless $@; +print "ok $test - s//3}->{3/e\n"; $test++; + +$_ = "not ok $test"; +$x{3} = "not "; +eval 's/${\%x}{3}//e'; +print "$_ - s//\${\\%x}{3}/e\n"; $test++; + +eval 's/${foo#}//e'; +print "not " unless $@; +print "ok $test - s/\${foo#}//e\n"; $test++; + +eval 'warn ({$_ => 1} + 1) if 0'; +print "not " if $@; +print "ok $test - listop({$_ => 1} + 1)\n"; $test++; +print "# $@" if $@; + +for(qw< require goto last next redo CORE::dump >) { + eval "sub { $_ foo << 2 }"; + print "not " if $@; + print "ok ", $test++, " - [perl #105924] $_ WORD << ...\n"; + print "# $@" if $@; +} + +# http://rt.perl.org/rt3/Ticket/Display.html?id=56880 +my $counter = 0; +eval 'v23: $counter++; goto v23 unless $counter == 2'; +print "not " unless $counter == 2; +print "ok $test - Use v[0-9]+ as a label\n"; $test++; +$counter = 0; +eval 'v23 : $counter++; goto v23 unless $counter == 2'; +print "not " unless $counter == 2; +print "ok $test - Use v[0-9]+ as a label with space before colon\n"; $test++; + +my $output = ""; +eval "package v10::foo; sub test2 { return 'v10::foo' } + package v10; sub test { return v10::foo::test2(); } + package main; \$output = v10::test(); "; +print "not " unless $output eq 'v10::foo'; +print "ok $test - call a function in package v10::foo\n"; $test++; + +print "not " unless (1?v65:"bar") eq chr(65); +print "ok $test - colon detection after vstring does not break ? vstring :\n"; $test++; + +print ((ord("A") == 65) ? v35 : v123); # NUMBER SIGN is the same for all + # supported EBCDIC platforms +print "not "; +print ((ord("A") == 65) ? v10 : "\n"); # LF varies on EBCDIC, if the v123 for + # '#' works above, consider it good + # enough. + print "ok $test - print vstring prints the vstring\n"; +$test++; + +# Test pyoq ops with comments before the first delim +q # comment + "b"# + eq 'b' or print "not "; +print "ok $test - q <comment> <newline> ...\n"; $test++; +qq # comment + "b"# + eq 'b' or print "not "; +print "ok $test - qq <comment> <newline> ...\n"; $test++; +qw # comment + "b"# + [0] eq 'b' or print "not "; +print "ok $test - qw <comment> <newline> ...\n"; $test++; +"b" =~ m # comment + "b"# + or print "not "; +print "ok $test - m <comment> <newline> ...\n"; $test++; +qr # comment + "b"# + eq qr/b/ or print "not "; +print "ok $test - qr <comment> <newline> ...\n"; $test++; +$_ = "a"; +s # comment + [a] # + [b] # + ; +print "not " unless $_ eq 'b'; +print "ok $test - s <comment> <newline> ...\n"; $test++; +$_ = "a"; +tr # comment + [a] # + [b] # + ; +print "not " unless $_ eq 'b'; +print "ok $test - tr <comment> <newline> ...\n"; $test++; +$_ = "a"; +y # comment + [a] # + [b] # + ; +print "not " unless $_ eq 'b'; +print "ok $test - y <comment> <newline> ...\n"; $test++; + +print "not " unless (time + =>) eq time=>; +print "ok $test - => quotes keywords across lines\n"; $test++; + +# [perl #80368] +print "not " unless eval '"a\U="' eq "a="; +print "ok $test - [perl #80368] qq <a\\U=>\n"; $test++; + +sub Function_with_side_effects { $_ = "sidekick function called" } +print "not " unless + (eval '${Function_with_side_effects,\$_}' || $@) + eq "sidekick function called"; +print "ok $test - \${...} where {...} looks like hash\n"; $test++; + +@_ = map{BEGIN {$_122782 = 'tst2'}; "rhu$_"} 'barb2'; +print "not " unless "@_" eq 'rhubarb2'; +print "ok $test - map{BEGIN...\n"; $test++; +print "not " unless $_122782 eq 'tst2'; +print "ok $test - map{BEGIN...\n"; $test++; +${ +=pod +blah blah blah +=cut +\$_ } = 42; +print "not "unless $_ == 42; +print "ok $test - \${ <newline> =pod\n"; $test++; +@_ = map{ +=pod +blah blah blah +=cut +$_+1 } 1; +print "not "unless "@_" eq 2; +print "ok $test - map{ <newline> =pod\n"; $test++; +eval { ${...}++ }; +print "not " unless $@ =~ /^Unimplemented at /; +print "ok $test - \${...} (literal triple-dot)\n"; $test++; +eval { () = map{...} @_ }; +print "not " unless $@ =~ /^Unimplemented at /; +print "ok $test - map{...} (literal triple-dot)\n"; $test++; +print "not " unless &{sub :lvalue { "a" }} eq "a"; +print "ok $test - &{sub :lvalue...}\n"; $test++; +print "not " unless ref +(map{sub :lvalue { "a" }} 1)[0] eq "CODE"; +print "ok $test - map{sub :lvalue...}\n"; $test++; + +# Used to crash [perl #123711] +0-5x-l{0}; + +# Used to fail an assertion [perl #123617] [perl #123955] +eval '"$a{ 1 m// }"; //'; +eval '"@0{0s 000";eval"$"'; + +# Pending token stack overflow [perl #123677] +{ + local $SIG{__WARN__}=sub{}; + eval q|s)$0{0h());qx(@0);qx(@0);qx(@0)|; +} + +# Used to crash [perl #123801] +eval q|s##[}#e|; + +# Used to fail an assertion [perl #123763] +{ + local $SIG{__WARN__}=sub{}; + eval q|my($_);0=split|; + eval q|my $_; @x = split|; +} + +{ + # Used to crash [perl #124187] + eval q|qq{@{[{}}*sub{]]}}}=u|; +} + +{ + # Used to crash [perl #124385] + eval '0; qq{@{sub{]]}}}}}'; + print "ok $test - 124385\n"; $test++; +} + +{ + # Used to crash [perl #125350] + eval ('qq{@{[0}*sub{]]}}}=sub{0' . "\c["); + print "ok $test - 125350\n"; $test++; +} + +{ + # Used to crash [perl #128171] + eval ('/@0{0*->@*/*]'); + print "ok $test - 128171\n"; $test++; +} +{ + # various sub-parse recovery issues that crashed perl + eval 's//${sub{b{]]]{}#$/ sub{}'; + print "ok $test - 132640\n"; $test++; + eval 'qq{@{sub{]]}}}};shift'; + print "ok $test - 125351\n"; $test++; + eval 'qq{@{sub{]]}}}}-shift'; + print "ok $test - 126192\n"; $test++; +} + +$foo = "WRONG"; $foo:: = "bar"; $bar = "baz"; +print "not " unless "$foo::$bar" eq "barbaz"; +print qq|ok $test - [perl #128478] "\$foo::\$bar"\n|; $test++; +@bar = ("baz","bonk"); +print "not " unless "$foo::@bar" eq "barbaz bonk"; +print qq|ok $test - [perl #128478] "\$foo::\@bar"\n|; $test ++; + +# Test that compilation of tentative indirect method call syntax which +# turns out not to be such does not upgrade constants to full globs in the +# symbol table. +sub fop() { 0 } +sub bas() { 0 } +{ local $SIG{__WARN__}=sub{}; eval 'fop bas'; } +print "not " unless ref $::{fop} eq 'SCALAR'; +print "ok $test - first constant in 'const1 const2' is not upgraded\n"; +$test++; +print "not " unless ref $::{bas} eq 'SCALAR'; +print "ok $test - second constant in 'const1 const2' is not upgraded\n"; +$test++; diff --git a/t/base/num.t b/t/base/num.t new file mode 100644 index 0000000000..6ccc0cf921 --- /dev/null +++ b/t/base/num.t @@ -0,0 +1,213 @@ +#!./perl + +print "1..53\n"; + +# First test whether the number stringification works okay. +# (Testing with == would exercise the IV/NV part, not the PV.) + +$a = 1; "$a"; +print $a eq "1" ? "ok 1\n" : "not ok 1 # $a\n"; + +$a = -1; "$a"; +print $a eq "-1" ? "ok 2\n" : "not ok 2 # $a\n"; + +$a = 1.; "$a"; +print $a eq "1" ? "ok 3\n" : "not ok 3 # $a\n"; + +$a = -1.; "$a"; +print $a eq "-1" ? "ok 4\n" : "not ok 4 # $a\n"; + +$a = 0.1; "$a"; +print $a eq "0.1" ? "ok 5\n" : "not ok 5 # $a\n"; + +$a = -0.1; "$a"; +print $a eq "-0.1" ? "ok 6\n" : "not ok 6 # $a\n"; + +$a = .1; "$a"; +print $a eq "0.1" ? "ok 7\n" : "not ok 7 # $a\n"; + +$a = -.1; "$a"; +print $a eq "-0.1" ? "ok 8\n" : "not ok 8 # $a\n"; + +$a = 10.01; "$a"; +print $a eq "10.01" ? "ok 9\n" : "not ok 9 # $a\n"; + +$a = 1e3; "$a"; +print $a eq "1000" ? "ok 10\n" : "not ok 10 # $a\n"; + +$a = 10.01e3; "$a"; +print $a eq "10010" ? "ok 11\n" : "not ok 11 # $a\n"; + +$a = 0b100; "$a"; +print $a eq "4" ? "ok 12\n" : "not ok 12 # $a\n"; + +$a = 0100; "$a"; +print $a eq "64" ? "ok 13\n" : "not ok 13 # $a\n"; + +$a = 0x100; "$a"; +print $a eq "256" ? "ok 14\n" : "not ok 14 # $a\n"; + +$a = 1000; "$a"; +print $a eq "1000" ? "ok 15\n" : "not ok 15 # $a\n"; + +# more hex and binary tests below starting at 51 + +# Okay, now test the numerics. +# We may be assuming too much, given the painfully well-known floating +# point sloppiness, but the following are still quite reasonable +# assumptions which if not working would confuse people quite badly. + +$a = 1; "$a"; # Keep the stringification as a potential troublemaker. +print $a + 1 == 2 ? "ok 16\n" : "not ok 16 #" . $a + 1 . "\n"; +# Don't know how useful printing the stringification of $a + 1 really is. + +$a = -1; "$a"; +print $a + 1 == 0 ? "ok 17\n" : "not ok 17 #" . $a + 1 . "\n"; + +$a = 1.; "$a"; +print $a + 1 == 2 ? "ok 18\n" : "not ok 18 #" . $a + 1 . "\n"; + +$a = -1.; "$a"; +print $a + 1 == 0 ? "ok 19\n" : "not ok 19 #" . $a + 1 . "\n"; + +sub ok { # Can't assume too much of floating point numbers. + my ($a, $b, $c) = @_; + abs($a - $b) <= $c; +} + +$a = 0.1; "$a"; +print ok($a + 1, 1.1, 0.05) ? "ok 20\n" : "not ok 20 #" . $a + 1 . "\n"; + +$a = -0.1; "$a"; +print ok($a + 1, 0.9, 0.05) ? "ok 21\n" : "not ok 21 #" . $a + 1 . "\n"; + +$a = .1; "$a"; +print ok($a + 1, 1.1, 0.005) ? "ok 22\n" : "not ok 22 #" . $a + 1 . "\n"; + +$a = -.1; "$a"; +print ok($a + 1, 0.9, 0.05) ? "ok 23\n" : "not ok 23 #" . $a + 1 . "\n"; + +$a = 10.01; "$a"; +print ok($a + 1, 11.01, 0.005) ? "ok 24\n" : "not ok 24 #" . $a + 1 . "\n"; + +$a = 1e3; "$a"; +print $a + 1 == 1001 ? "ok 25\n" : "not ok 25 #" . $a + 1 . "\n"; + +$a = 10.01e3; "$a"; +print $a + 1 == 10011 ? "ok 26\n" : "not ok 26 #" . $a + 1 . "\n"; + +$a = 0b100; "$a"; +print $a + 1 == 0b101 ? "ok 27\n" : "not ok 27 #" . $a + 1 . "\n"; + +$a = 0100; "$a"; +print $a + 1 == 0101 ? "ok 28\n" : "not ok 28 #" . $a + 1 . "\n"; + +$a = 0x100; "$a"; +print $a + 1 == 0x101 ? "ok 29\n" : "not ok 29 #" . $a + 1 . "\n"; + +$a = 1000; "$a"; +print $a + 1 == 1001 ? "ok 30\n" : "not ok 30 #" . $a + 1 . "\n"; + +# back to some basic stringify tests +# we expect NV stringification to work according to C sprintf %.*g rules + +if ($^O eq 'os2') { # In the long run, fix this. For 5.8.0, deal. + $a = 0.01; "$a"; + print $a eq "0.01" || $a eq '1e-02' ? "ok 31\n" : "not ok 31 # $a\n"; + + $a = 0.001; "$a"; + print $a eq "0.001" || $a eq '1e-03' ? "ok 32\n" : "not ok 32 # $a\n"; + + $a = 0.0001; "$a"; + print $a eq "0.0001" || $a eq '1e-04' ? "ok 33\n" : "not ok 33 # $a\n"; +} else { + $a = 0.01; "$a"; + print $a eq "0.01" ? "ok 31\n" : "not ok 31 # $a\n"; + + $a = 0.001; "$a"; + print $a eq "0.001" ? "ok 32\n" : "not ok 32 # $a\n"; + + $a = 0.0001; "$a"; + print $a eq "0.0001" ? "ok 33\n" : "not ok 33 # $a\n"; +} + +$a = 0.00009; "$a"; +print $a eq "9e-05" || $a eq "9e-005" ? "ok 34\n" : "not ok 34 # $a\n"; + +$a = 1.1; "$a"; +print $a eq "1.1" ? "ok 35\n" : "not ok 35 # $a\n"; + +$a = 1.01; "$a"; +print $a eq "1.01" ? "ok 36\n" : "not ok 36 # $a\n"; + +$a = 1.001; "$a"; +print $a eq "1.001" ? "ok 37\n" : "not ok 37 # $a\n"; + +$a = 1.0001; "$a"; +print $a eq "1.0001" ? "ok 38\n" : "not ok 38 # $a\n"; + +$a = 1.00001; "$a"; +print $a eq "1.00001" ? "ok 39\n" : "not ok 39 # $a\n"; + +$a = 1.000001; "$a"; +print $a eq "1.000001" ? "ok 40\n" : "not ok 40 # $a\n"; + +$a = 0.; "$a"; +print $a eq "0" ? "ok 41\n" : "not ok 41 # $a\n"; + +$a = 100000.; "$a"; +print $a eq "100000" ? "ok 42\n" : "not ok 42 # $a\n"; + +$a = -100000.; "$a"; +print $a eq "-100000" ? "ok 43\n" : "not ok 43 # $a\n"; + +$a = 123.456; "$a"; +print $a eq "123.456" ? "ok 44\n" : "not ok 44 # $a\n"; + +$a = 1e34; "$a"; +unless ($^O eq 'posix-bc') +{ print $a eq "1e+34" || $a eq "1e+034" ? "ok 45\n" : "not ok 45 # $a\n"; } +else +{ print "ok 45 # skipped on $^O\n"; } + +# see bug #15073 + +$a = 0.00049999999999999999999999999999999999999; +$b = 0.0005000000000000000104; +print $a <= $b ? "ok 46\n" : "not ok 46\n"; + +if ($^O eq 'ultrix' || $^O eq 'VMS' || + (pack("d", 1) =~ /^[\x80\x10]\x40/) # VAX D_FLOAT, G_FLOAT. + ) { + # Ultrix enters looong nirvana over this. VMS blows up when configured with + # D_FLOAT (but with G_FLOAT or IEEE works fine). The test should probably + # make the number of 0's a function of NV_DIG, but that's not in Config and + # we probably don't want to suck Config into a base test anyway. + print "ok 47 # skipped on $^O\n"; +} else { + $a = 0.00000000000000000000000000000000000000000000000000000000000000000001; + print $a > 0 ? "ok 47\n" : "not ok 47\n"; +} + +$a = 80000.0000000000000000000000000; +print $a == 80000.0 ? "ok 48\n" : "not ok 48\n"; + +$a = 1.0000000000000000000000000000000000000000000000000000000000000000000e1; ... 89588 lines suppressed ... -- Perl5 Master Repository
