]>
Commit | Line | Data |
---|---|---|
48d0341c | 1 | #!/bin/sh |
76352f64 | 2 | # Testing the implementation of LC_NUMERIC and snprintf(3). |
2b778ceb | 3 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. |
76352f64 | 4 | # This file is part of the GNU C Library. |
76352f64 UD |
5 | |
6 | # The GNU C Library is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU Lesser General Public | |
8 | # License as published by the Free Software Foundation; either | |
9 | # version 2.1 of the License, or (at your option) any later version. | |
10 | ||
11 | # The GNU C Library is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # Lesser General Public License for more details. | |
15 | ||
16 | # You should have received a copy of the GNU Lesser General Public | |
59ba27a6 | 17 | # License along with the GNU C Library; if not, see |
5a82c748 | 18 | # <https://www.gnu.org/licenses/>. |
76352f64 | 19 | |
57c69bef DL |
20 | set -e |
21 | ||
76352f64 | 22 | common_objpfx=$1 |
740b3dbe | 23 | test_program_prefix=$2 |
76352f64 UD |
24 | datafile=$3 |
25 | ||
26 | # Run the tests. | |
4cfde896 | 27 | errcode=0 |
76352f64 UD |
28 | # There's a TAB for IFS |
29 | while IFS=" " read locale format value expect; do | |
a234e27d | 30 | case "$locale" in '#'*) continue ;; esac |
76352f64 | 31 | if [ -n "$format" ]; then |
8540f6d2 | 32 | if ${test_program_prefix} ${common_objpfx}localedata/tst-numeric \ |
6fb54a22 | 33 | "$locale" "$format" "$value" "$expect" < /dev/null |
4cfde896 | 34 | then |
76352f64 UD |
35 | echo "Locale: \"${locale}\" Format: \"${format}\"" \ |
36 | "Value: \"${value}\" Expect: \"${expect}\" passed" | |
37 | else | |
4cfde896 | 38 | errcode=$? |
76352f64 UD |
39 | echo "Locale: \"${locale}\" Format: \"${format}\"" \ |
40 | "Value: \"${value}\" Expect: \"${expect}\" failed" | |
41 | fi | |
42 | fi | |
43 | done < $datafile | |
44 | ||
4cfde896 | 45 | exit $errcode |
76352f64 UD |
46 | # Local Variables: |
47 | # mode:shell-script | |
48 | # End: |