From 1402e1ebcb8d82c4d6423a1d27f1f5b6791da0a8 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 16 Sep 2014 05:47:17 -0700 Subject: [PATCH] lexsub.t: To-do tests for sort lex_sub --- t/op/lexsub.t | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/t/op/lexsub.t b/t/op/lexsub.t index 966aa07..7fedbf9 100644 --- a/t/op/lexsub.t +++ b/t/op/lexsub.t @@ -7,7 +7,7 @@ BEGIN { *bar::is = *is; *bar::like = *like; } -plan 137; +plan 139; # -------------------- Errors with feature disabled -------------------- # @@ -384,6 +384,13 @@ is runperl(switches => ['-lXMfeature=:all'], state sub x { is +(caller 0)[3], 'x', 'state sub name in caller' } x } +sub _cmp { $a cmp $b } +{ + local $::TODO = ' '; + state sub _cmp { $b cmp $a } + is join(" ", sort _cmp split //, 'lexsub'), 'x u s l e b', + 'sort state_sub LIST' +} # -------------------- my -------------------- # @@ -735,6 +742,12 @@ is runperl(switches => ['-lXMfeature=:all'], my sub x { is +(caller 0)[3], 'x', 'my sub name in caller' } x } +{ + local $::TODO = ' '; + my sub _cmp { $b cmp $a } + is join(" ", sort _cmp split //, 'lexsub'), 'x u s l e b', + 'sort my_sub LIST' +} # -------------------- Interactions (and misc tests) -------------------- # -- 1.8.3.1