From 00385e8d0e1f83a58710ada4a210d15102542b7d Mon Sep 17 00:00:00 2001 From: Davis Mosenkovs Date: Wed, 20 Apr 2016 14:44:13 -0700 Subject: Fix touch -t seconds parsing --- tests/touch.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/touch.test') diff --git a/tests/touch.test b/tests/touch.test index d386156d..d193d7cc 100755 --- a/tests/touch.test +++ b/tests/touch.test @@ -11,6 +11,18 @@ testing "-c" "touch -c walrus && [ -e walrus ] && echo yes" "yes\n" "" "" testing "-c missing" "touch -c warrus && [ ! -e warrus ] && echo yes" \ "yes\n" "" "" +testing "-t" \ + "touch -t 201201231234 walrus && date -r walrus +%Y%m%d-%H%M%S.%N" \ + "20120123-123400.000000000\n" "" "" + +testing "-t seconds" \ + "touch -t 201201231234.56 walrus && date -r walrus +%Y%m%d-%H%M%S.%N" \ + "20120123-123456.000000000\n" "" "" + +testing "-t nanoseconds" \ + "touch -t 201201231234.56123456789 walrus && date -r walrus +%Y%m%d-%H%M%S.%N" \ + "20120123-123456.123456789\n" "" "" + testing "-d" \ "touch -d 2009-02-13T23:31:30Z walrus && date -r walrus +%s" \ "1234567890\n" "" "" -- cgit v1.2.3