The description looked up the message of whatever errno was set when the description was built, so an error printed later read "Success (errno 28)".
12 lines
342 B
Swift
12 lines
342 B
Swift
import Testing
|
|
@testable import Inotify
|
|
|
|
@Suite("Error Description")
|
|
struct InotifyErrorTests {
|
|
@Test func describesTheStoredErrnoAndNotTheCurrentOne() {
|
|
let error = InotifyError.addWatchFailed(path: "/watched", errno: 28)
|
|
|
|
#expect(error.description == "inotify_add_watch failed for '/watched': No space left on device (errno 28)")
|
|
}
|
|
}
|