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 3fc9c40 commit edc213dCopy full SHA for edc213d
tests/by-util/test_timeout.rs
@@ -125,6 +125,24 @@ 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 short timeouts.
139
+ // https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77535
140
141
+ .args(&["1e-18172487393827593258", "sleep", "1"])
142
143
144
+}
145
+
146
#[test]
147
fn test_negative_interval() {
148
new_ucmd!()
0 commit comments