summaryrefslogtreecommitdiff
path: root/.config/fisher/github.com/matchai/spacefish/tests/__sf_util_human_time.test.fish
blob: 730cc027c9f12de4e2a63f6f3a67777b288652dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
test "Shows milliseconds"
	'1ms' = (
		echo 1 | __sf_util_human_time my_var
	)
end

test "Shows seconds"
	'1s' = (
		echo 1000 | __sf_util_human_time my_var
	)
end

test "Shows seconds and milliseconds"
	'1s 1ms' = (
		echo 1001 | __sf_util_human_time my_var
	)
end

test "Shows minutes"
	'1m' = (
		echo 60000 | __sf_util_human_time my_var
	)
end

test "Shows minutes and milliseconds"
	'1m 1ms' = (
		echo 60001 | __sf_util_human_time my_var
	)
end

test "Shows minutes and seconds"
	'1m 1s' = (
		echo 61000 | __sf_util_human_time my_var
	)
end

test "Shows minutes, seconds, and milliseconds"
	'1m 1s 1ms' = (
		echo 61001 | __sf_util_human_time my_var
	)
end

test "Shows hours"
	'1h' = (
		echo 3600000 | __sf_util_human_time my_var
	)
end

test "Shows hours and milliseconds"
	'1h 1ms' = (
		echo 3600001 | __sf_util_human_time my_var
	)
end

test "Shows hours and seconds"
	'1h 1s' = (
		echo 3601000 | __sf_util_human_time my_var
	)
end

test "Shows hours, seconds, and milliseconds"
	'1h 1s 1ms' = (
		echo 3601001 | __sf_util_human_time my_var
	)
end

test "Shows hours and minutes"
	'1h 1m' = (
		echo 3660000 | __sf_util_human_time my_var
	)
end

test "Shows hours, minutes, and milliseconds"
	'1h 1m 1ms' = (
		echo 3660001 | __sf_util_human_time my_var
	)
end

test "Shows hours, minutes, and seconds"
	'1h 1m 1s' = (
		echo 3661000 | __sf_util_human_time my_var
	)
end

test "Shows hours, minutes, seconds, and milliseconds"
	'1h 1m 1s 1ms' = (
		echo 3661001 | __sf_util_human_time my_var
	)
end