From: Nicholas Clark Date: Fri, 9 Oct 2009 08:18:37 +0000 (+0200) Subject: Replace longhand invocations of test() with 3 nested loops. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=386ac4df40d7d0f9109485405028e505ec8f11d7;p=p5sagit%2Fp5-mst-13.2.git Replace longhand invocations of test() with 3 nested loops. --- diff --git a/t/comp/utf.t b/t/comp/utf.t index 5a57ba9..904c8a3 100644 --- a/t/comp/utf.t +++ b/t/comp/utf.t @@ -35,25 +35,13 @@ sub test { is($got, $tag); } -test("utf16le", 123, 1); -test("utf16le", 1234, 1); -test("utf16le", 12345, 1); -test("utf16be", 123, 1); -test("utf16be", 1234, 1); -test("utf16be", 12345, 1); -test("utf8", 123, 1); -test("utf8", 1234, 1); -test("utf8", 12345, 1); - -test("utf16le", 123, 0); -test("utf16le", 1234, 0); -test("utf16le", 12345, 0); -test("utf16be", 123, 0); -test("utf16be", 1234, 0); -test("utf16be", 12345, 0); -test("utf8", 123, 0); -test("utf8", 1234, 0); -test("utf8", 12345, 0); +for my $bom (0, 1) { + for my $enc (qw(utf16le utf16be utf8)) { + for my $value (123, 1234, 12345) { + test($enc, $value, $bom); + } + } +} END { 1 while unlink "utf$$.pl";