forked from Lainports/freebsd-ports
pdd (Python3 Date Diff) is a tiny command line utility to calculate date and time difference. It can also be used as a timer. If no program arguments are specified it shows the current date, time and timezone. pdd has been written with only one goal - simplicity. Users shouldn't have to memorize anything. WWW: https://github.com/jarun/pdd
39 lines
2.4 KiB
Python
39 lines
2.4 KiB
Python
--- test.py.orig 2024-11-19 09:24:59 UTC
|
|
+++ test.py
|
|
@@ -17,21 +17,21 @@ test = [
|
|
import subprocess
|
|
|
|
test = [
|
|
- ('./pdd', '-d', '1983', 'jul', '3', '2014', '1', '15'), # 1
|
|
- ('./pdd', '-d', '2014', '1', '15', '1983', 'jul', '03'), # 2
|
|
- ('./pdd', '-t', '45:50', '6:17:33'), # 3
|
|
- ('./pdd', '-t', '6:17:33', '45:50'), # 4
|
|
- ('./pdd', '-t', '5:80:75', '6:17:33'), # 5
|
|
- ('./pdd', '-t', '6:17:33', '5:80:75'), # 6
|
|
- ('./pdd', '-d', '2000', 'FEB', '28', '3', '2', '1', '--add'), # 7
|
|
- ('./pdd', '-d', '2000', 'FEB', '28', '1', '2', '3', '--add'), # 8
|
|
- ('./pdd', '-t', '47:71:37', '1:2:63', '--add'), # 9
|
|
- ('./pdd', '-d', '2000', 'Mar', '01', '0', '0', '1', '--sub'), # 10
|
|
- ('./pdd', '-d', '2000', 'Mar', '1', '1', '1', '1', '--sub'), # 11
|
|
- ('./pdd', '-t', '00:00:00', '0:0:1', '--sub'), # 12
|
|
- ('./pdd', '-t', '25:61:61', '0:0:0', '--sub'), # 13
|
|
- ('./pdd', '-t', '0:0:0', '1:1:1', '--sub'), # 14
|
|
- ('./pdd', '-t', '0:0:0', '25:61:61', '--sub'), # 15
|
|
+ ('pdd', '-d', '1983', 'jul', '3', '2014', '1', '15'), # 1
|
|
+ ('pdd', '-d', '2014', '1', '15', '1983', 'jul', '03'), # 2
|
|
+ ('pdd', '-t', '45:50', '6:17:33'), # 3
|
|
+ ('pdd', '-t', '6:17:33', '45:50'), # 4
|
|
+ ('pdd', '-t', '5:80:75', '6:17:33'), # 5
|
|
+ ('pdd', '-t', '6:17:33', '5:80:75'), # 6
|
|
+ ('pdd', '-d', '2000', 'FEB', '28', '3', '2', '1', '--add'), # 7
|
|
+ ('pdd', '-d', '2000', 'FEB', '28', '1', '2', '3', '--add'), # 8
|
|
+ ('pdd', '-t', '47:71:37', '1:2:63', '--add'), # 9
|
|
+ ('pdd', '-d', '2000', 'Mar', '01', '0', '0', '1', '--sub'), # 10
|
|
+ ('pdd', '-d', '2000', 'Mar', '1', '1', '1', '1', '--sub'), # 11
|
|
+ ('pdd', '-t', '00:00:00', '0:0:1', '--sub'), # 12
|
|
+ ('pdd', '-t', '25:61:61', '0:0:0', '--sub'), # 13
|
|
+ ('pdd', '-t', '0:0:0', '1:1:1', '--sub'), # 14
|
|
+ ('pdd', '-t', '0:0:0', '25:61:61', '--sub'), # 15
|
|
]
|
|
|
|
res = [
|