| 1 | #!/bin/bash |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 4 | # |
| 5 | # Copyright (C) 2023 Thomas Weißschuh <[email protected]> |
| 6 | # |
| 7 | # This file may be distributed under the terms of the |
| 8 | # GNU Lesser General Public License. |
| 9 | # |
| 10 | TS_TOPDIR="${0%/*}/../.." |
| 11 | TS_DESC="timeutils library" |
| 12 | |
| 13 | . "$TS_TOPDIR"/functions.sh |
| 14 | ts_init "$*" |
| 15 | |
| 16 | ts_check_test_command "$TS_HELPER_TIMEUTILS" |
| 17 | |
| 18 | ts_init_subtest "timestamp" |
| 19 | "$TS_HELPER_TIMEUTILS" --unittest-timestamp 2> "$TS_ERRLOG" || ts_die "test failed" |
| 20 | ts_finalize_subtest |
| 21 | |
| 22 | ts_init_subtest "format" |
| 23 | "$TS_HELPER_TIMEUTILS" --unittest-format 2> "$TS_ERRLOG" || ts_die "test failed" |
| 24 | ts_finalize_subtest |
| 25 | |
| 26 | ts_init_subtest "format-relative" |
| 27 | "$TS_HELPER_TIMEUTILS" --unittest-format-relative 2> "$TS_ERRLOG" || ts_die "test failed" |
| 28 | ts_finalize_subtest |
| 29 | |
| 30 | ts_finalize |