[glib: 1/4] tests: Add tests for modifiers for GDateTime’s `%l` placeholder




commit f1916032e472e4ae7a68c62db933c4f9ecac4c13
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Jun 20 14:25:06 2022 +0100

    tests: Add tests for modifiers for GDateTime’s `%l` placeholder
    
    They were missing.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #2655

 glib/tests/gdatetime.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 141263b662..dd83ce7ba7 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -1812,6 +1812,15 @@ test_modifiers (void)
   TEST_PRINTF_TIME ( 1, 0, 0, "%-k", "1");
   TEST_PRINTF_TIME ( 1, 0, 0, "%0k", "01");
 
+  TEST_PRINTF_TIME ( 1, 0, 0,  "%l", " 1");
+  TEST_PRINTF_TIME ( 1, 0, 0, "%_l", " 1");
+  TEST_PRINTF_TIME ( 1, 0, 0, "%-l", "1");
+  TEST_PRINTF_TIME ( 1, 0, 0, "%0l", "01");
+  TEST_PRINTF_TIME (23, 0, 0,  "%l", "11");
+  TEST_PRINTF_TIME (23, 0, 0, "%_l", "11");
+  TEST_PRINTF_TIME (23, 0, 0, "%-l", "11");
+  TEST_PRINTF_TIME (23, 0, 0, "%0l", "11");
+
   oldlocale = g_strdup (setlocale (LC_ALL, NULL));
   setlocale (LC_ALL, "fa_IR.utf-8");
 #ifdef HAVE_LANGINFO_OUTDIGIT


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]