From 8bbeb3045febcb6375f41d314f00d754f1d9a444 Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Mon, 1 Nov 1999 14:43:09 +0100 Subject: [PATCH] added some tests for byteorder sprintf, sscanf Rev: src/testsuite.in:1.218 --- src/testsuite.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/testsuite.in b/src/testsuite.in index d9c278f4ea..d9b936e46c 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.217 1999/10/31 14:59:37 grubba Exp $"]]) +test_true([["$Id: testsuite.in,v 1.218 1999/11/01 13:43:09 mirar Exp $"]]) cond([[all_constants()->_verify_internals]], [[ @@ -1467,6 +1467,13 @@ cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]], test_eq([[ sprintf("%08x", @array_sscanf("\8\7\6\5\1\2\3\4", "%8c")) ]], "3807060501020304") test_eq([[ sprintf("%08x", @array_sscanf("\010\7\6\5\1\2\3\4", "%8c")) ]], "807060501020304") + test_eq([[ sprintf("%4c",16909060) ]],"\1\2\3\4") + test_eq([[ sprintf("%-4c",16909060) ]],"\4\3\2\1") + test_eq([[ array_sscanf(sprintf("%4c",16909060),"%4c")[0] ]],16909060) + test_eq([[ array_sscanf(sprintf("%-4c",16909060),"%-4c")[0] ]],16909060) + test_eq([[ sprintf("%2c",16909060) ]],"\3\4") + test_eq([[ sprintf("%-2c",16909060) ]],"\4\3") + test_equal([[ ({ 0, 118 }) ]], [[ array_sscanf("0x76", "%xx%x") ]]) test_equal([[ ({ 0, 557239244978618154304871 }) ]], [[ array_sscanf("0x76000000000001234567", "%xx%x") ]]) -- GitLab