We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb6dc3c commit c7876c4Copy full SHA for c7876c4
tests/by-util/test_timeout.rs
@@ -125,6 +125,23 @@ fn test_dont_overflow() {
125
.no_output();
126
}
127
128
+#[test]
129
+fn test_dont_underflow() {
130
+ new_ucmd!()
131
+ .args(&[".0000000001", "sleep", "1"])
132
+ .fails_with_code(124)
133
+ .no_output();
134
135
+ .args(&["1e-100", "sleep", "1"])
136
137
138
+ // Unlike GNU coreutils, we underflow to 1ns for very small timeouts.
139
140
+ .args(&["1e-18172487393827593258", "sleep", "1"])
141
142
143
+}
144
+
145
#[test]
146
fn test_negative_interval() {
147
new_ucmd!()
0 commit comments