summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorNomura <nomura.rh@gmail.com>2023-09-07 20:26:20 +0200
committerXavier Claessens <xclaesse@gmail.com>2023-09-09 19:03:22 -0400
commit5f46ea116c6f80edd3633c03aacd7427ef3d0cec (patch)
tree8a962727656fe58689e38b07296199bbd77d9b0a /test cases/common
parentb51bce070eead2b65e56f087acf23829a6304ae2 (diff)
downloadmeson-5f46ea116c6f80edd3633c03aacd7427ef3d0cec.tar.gz
Add support for padding zeroes in int.to_string() method
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/270 int_to_str_fill/meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/test cases/common/270 int_to_str_fill/meson.build b/test cases/common/270 int_to_str_fill/meson.build
new file mode 100644
index 000000000..a549d941e
--- /dev/null
+++ b/test cases/common/270 int_to_str_fill/meson.build
@@ -0,0 +1,9 @@
+project('test_fill_in_int_to_string')
+
+n = 4
+assert(n.to_string() == '4')
+assert(n.to_string(fill: 3) == '004')
+assert(n.to_string(fill: -3) == '4')
+
+n = -4
+assert(n.to_string(fill: 3) == '-04')