From 27eb5f1969a3a960bc12b675b3f61487b17c633a Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Mon, 1 Nov 1999 16:15:24 +0100
Subject: [PATCH] tests for %-4c here

Rev: src/modules/sprintf/testsuite.in:1.24
---
 src/modules/sprintf/testsuite.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/modules/sprintf/testsuite.in b/src/modules/sprintf/testsuite.in
index aaa7f2c781..784d2f555e 100644
--- a/src/modules/sprintf/testsuite.in
+++ b/src/modules/sprintf/testsuite.in
@@ -5,6 +5,15 @@ test_eq([[ array_sscanf(sprintf("%1c", -1), "%1c")[0] ]], 255)
 test_eq([[ array_sscanf(sprintf("%2c", -1), "%2c")[0] ]], 65535)
 test_eq([[ array_sscanf(sprintf("%3c", -1), "%3c")[0] ]], 16777215)
 
+test_eq([[ sprintf("%4c",16909060) ]],"\1\2\3\4")
+test_eq([[ sprintf("%-4c",16909060) ]],"\4\3\2\1")
+test_eq([[ sprintf("%2c",16909060) ]],"\3\4")
+test_eq([[ sprintf("%-2c",16909060) ]],"\4\3")
+test_eq([[ sprintf("%4c",2147483648) ]],"\200\0\0\0")
+test_eq([[ sprintf("%-4c",2147483648) ]],"\0\0\0\200")
+test_eq([[ sprintf("%2c",2147483648) ]],"\0\0")
+test_eq([[ sprintf("%-2c",2147483648) ]],"\0\0")
+
 cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],
 [[
   test_eq([[ sprintf("%1c", 0x1abcd7893) ]], "\223")
-- 
GitLab