summaryrefslogtreecommitdiff
path: root/t/op/utf8decode.t
Commit message (Collapse)AuthorAgeFilesLines
* In utf8decode.t, use //x to add comments to the parsing regexp.Nicholas Clark2011-03-121-3/+9
| | | | Also, assign directly to variables, instead of going via $1 to $7.
* In utf8decode.t, test that we get the expected Unicode character(s)Nicholas Clark2011-03-121-20/+24
| | | | | | Previously some (not all) of the "y"es cases detailed the expected code point. Add all those that were missing, and update the parsing regexp to cope with multiple Unicode characters.
* In utf8decode.t, constrain more tightly the testing of expected warnings.Nicholas Clark2011-03-121-20/+31
| | | | | | | | | If one warning is expected, use warning_like() to test for it, which will fail if multiple warnings are generated. Where multiple warnings are generated, as well as testing that the first seen matches the expected warning, check that the expected number are seen. Mark as TODO 3.4.1, which Markus Kuhn annotates as "All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signalled", because currently perl generates 18 warnings.
* In utf8decode.t, use warning_is() for the should-not-warn cases.Nicholas Clark2011-03-121-22/+17
| | | | | | | | Move the localised $SIG{__WARN__} handler into the block for the should-warn case, and avoid using $@ as the warnings accumulator. As an expected warning is always provided, eliminate the code for dealing with an unspecified expected warning. The re-ordering allows $id to be a lexical with the same scope as all others derived from the test table lines.
* In utf8decode.t, move the test data from a heredoc to <DATA>Nicholas Clark2011-03-121-46/+42
| | | | | | | As the test data is actually somewhat larger than the test code, git's diff shows this as moving the code upwards :-) Hence take advantage of the already-churning lines to remove the outermost block and reindent.
* In utf8decode.t, remove the \x sequence strings of bytesNicholas Clark2011-03-121-93/+84
| | | | | | For each test case, the information is duplicated in the hex sequences, and they don't rely on the "" interpolation of the heredoc that initialises the array @MK
* In utf8decode.t, test that the hex sequences and \x escapes are equivalent.Nicholas Clark2011-03-121-0/+2
| | | | | | The hex sequences had been in the test data since they were first added in ba210ebec161cde0, but have never actually been used, other than for a length cross-check.
* Convert utf8decode.t to test.plNicholas Clark2011-03-121-32/+17
|
* C<not> should be C<!> in utf8decode.t, to fix a precedence bug.Nicholas Clark2011-03-111-31/+31
| | | | | | | | | | | | | | | | Fixing the bug opens a whole can of worms. The test hasn't actually been testing failure since 35bcd33832d74e56. Indeed, 35bcd33832d74e56 increases the verbosity of warnings from unpack, meaning that the test needs to aggregate lines in its $SIG{__WARN__} handler. At which point it passes again. Until 097fb8e2acde8522, which adds ", immediately" to the UTF-8 diagnostics. Then 872c91ae155f6880 makes most every form of invalid Unicode warning free, and also overlong UTF-8 warning free. 618432450ee258c0 makes overlong UTF-8 warn once more. Finally, 08ca2aa38a29585f means that 'U0U*' needs to be replaced with 'C0U*'. So now it passes, and (I believe) actually *tests* what it intends to test. Long may that state of affairs endure.
* Fix unpack U to be the reverse of pack UJarkko Hietaniemi2001-09-111-19/+15
| | | | | | (but implement unpack U0U as a backdoor to get the UTF-8 malformed warnings from un-UTF-8 data) p4raw-id: //depot/perl@11993
* Integrate perlio:Jarkko Hietaniemi2001-03-281-12/+0
|\ | | | | | | | | | | | | | | [ 9421] Loose duplicate chunk. p4raw-link: @9421 on //depot/perlio: ac829cc3fb088ab84d8c0df184b703b601212226 p4raw-id: //depot/perl@9422
| * Loose duplicate chunk.Nick Ing-Simmons2001-03-281-12/+0
| | | | | | p4raw-id: //depot/perlio@9421
* | Integrate perlio:Jarkko Hietaniemi2001-03-281-0/+12
|\ \ | |/ | | | | | | | | | | | | | | | | [ 9417] PerlIO.pm / perlio.pm conflict. Update some pods. Make t/op/utf8decode.t a text file. p4raw-link: @9417 on //depot/perlio: 7d3b96bbd83d17f17b26b4c05ef623881c8477be p4raw-id: //depot/perl@9418
| * PerlIO.pm / perlio.pm conflict.Nick Ing-Simmons2001-03-281-1/+0
| | | | | | | | | | | | Update some pods. Make t/op/utf8decode.t a text file. p4raw-id: //depot/perlio@9417
| * Integrate mainline.Nick Ing-Simmons2001-03-281-1/+14
| |\ | | | | | | p4raw-id: //depot/perlio@9411
| * | More EBCDIC tweaks:Nick Ing-Simmons2001-03-281-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - one more swash issue &~(0xA0-1) did not do the right thing, for UTF-EBCDIC where &~(0x80-1) does for UTF-8. - add "use re 'asciirange'" to make [!-~] etc. work use it in MIME::QuotedPrint and t/op/regexp.t and t/op/pat.t - Choose a key for t/op/each.t test which gets encoded. - Skip utf8decode if this is UTF-EBCDIC. p4raw-id: //depot/perlio@9400
* | | Dup hunk.Jarkko Hietaniemi2001-03-281-13/+0
| | | | | | | | | p4raw-id: //depot/perl@9413
* | | Forced integrate from perlio.Jarkko Hietaniemi2001-03-281-0/+12
| |/ |/| | | | | | | p4raw-id: //depot/perl@9412 p4raw-integrated: from //depot/perlio@9410 'copy in' t/op/utf8decode.t (@9400..)
* | Integrate perlio:Jarkko Hietaniemi2001-03-281-3/+18
|/ | | | | | | | | | | | | | [ 9400] More EBCDIC tweaks: - one more swash issue &~(0xA0-1) did not do the right thing, for UTF-EBCDIC where &~(0x80-1) does for UTF-8. - add "use re 'asciirange'" to make [!-~] etc. work use it in MIME::QuotedPrint and t/op/regexp.t and t/op/pat.t - Choose a key for t/op/each.t test which gets encoded. - Skip utf8decode if this is UTF-EBCDIC. p4raw-link: @9400 on //depot/perlio: daf0f78e031c718c75590ef9ef573756f805776e p4raw-id: //depot/perl@9407
* Recode the naughty binary bytes ([\x00-\x08\x0b-\x1f\x7f-\xff])Jarkko Hietaniemi2000-12-191-81/+81
| | | | | | using the \xHH notation. No more inlined UTF-8, sigh, but easier on editors and diffing/patching. p4raw-id: //depot/perl@8204
* Polymorphic regexps.Jarkko Hietaniemi2000-12-171-0/+2
| | | | | | | Fixes at least the bugs 20001028.003 (both of them...) and 20001108.001. The bugs 20001114.001 and 20001205.014 seem also to be fixed by now, probably already before this patch. p4raw-id: //depot/perl@8143
* Introduce macros for UTF8 decoding.Jarkko Hietaniemi2000-12-081-7/+7
| | | p4raw-id: //depot/perl@8028
* Split off the UTF-8 decoder tests, make them to check alsoJarkko Hietaniemi2000-12-051-0/+181
the error message. p4raw-id: //depot/perl@7996