diff options
Diffstat (limited to 'tests/test_locale.c')
-rw-r--r-- | tests/test_locale.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_locale.c b/tests/test_locale.c new file mode 100644 index 00000000..4aba30db --- /dev/null +++ b/tests/test_locale.c @@ -0,0 +1,24 @@ +#include <locale.h> +#include <stdio.h> + +int main() +{ + // Test basic functions from classic locale. + struct lconv* locale = localeconv(); + + printf("Testing locale information.\n"); + printf("Decimal point: %s\n", locale->decimal_point); + printf("Thousands separator: %s\n", locale->thousands_sep); + printf("Grouping: %s\n", locale->grouping); + printf("International currency symbol: %s\n", locale->int_curr_symbol); + printf("Currency symbol: %s\n", locale->currency_symbol); + printf("Money decimal point: %s\n", locale->mon_decimal_point); + printf("Money thousands separator: %s\n", locale->mon_thousands_sep); + printf("Money Grouping: %s\n", locale->mon_grouping); + printf("Positive sign: %s\n", locale->positive_sign); + printf("Negative sign: %s\n", locale->negative_sign); + + // If no runtime errors, assume the test passed. + printf("Locale tests passed.\n"); + return 0; +} |