Skip to content

Commit 13b451b

Browse files
karbassiBenoit Sagols
andauthored
Add support for macOS catalina date (#300)
Co-authored-by: Benoit Sagols <[email protected]>
1 parent 34d31ef commit 13b451b

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

tests/test-lib.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -495,19 +495,12 @@ test_init_todo () {
495495
#...
496496
if date --version 2>&1 | grep -q "GNU"; then
497497
DATE_STYLE=GNU
498-
# on Mac OS X 10.15:
499-
#date --version
500-
#date: illegal option -- -
501-
#usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
502-
# [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
503-
elif date --version 2>&1 | grep -q -e "-jnRu"; then
504-
DATE_STYLE=Mac10.15
505498
# on Mac OS X 10.5:
506499
#date --version
507500
#date: illegal option -- -
508501
#usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
509502
# [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
510-
elif date --version 2>&1 | grep -q -e "-jnu"; then
503+
elif date --version 2>&1 | grep -q -e "-jnR\?u"; then
511504
DATE_STYLE=Mac10.5
512505
# on Mac OS X 10.4:
513506
#date --version
@@ -526,13 +519,6 @@ test_init_todo () {
526519
EOF
527520
chmod 755 bin/date
528521
;;
529-
Mac10.15)
530-
cat > bin/date <<-EOF
531-
#!/bin/sh
532-
exec "$TODO_TEST_REAL_DATE" -j -f %s \$TODO_TEST_TIME \$@
533-
EOF
534-
chmod 755 bin/date
535-
;;
536522
Mac10.5)
537523
cat > bin/date <<-EOF
538524
#!/bin/sh

0 commit comments

Comments
 (0)