Commit Graph

70 Commits

Author SHA1 Message Date
Fabian Boehm
57317fdaf2 Remove now unused assert helpers 2024-02-22 20:10:16 +01:00
PolyMeilex
971d774e67 Use OwnedFd in AutoClosePipes 2024-02-11 11:40:27 -08:00
Fabian Boehm
5d2d44feed Reduce some numbers to make cargo test run faster
This reduces the test time by ~33% on my system (23s to 15s)

Given that it takes ~180-240s on Github Actions, if we get a reduction
like that we can save over a minute.
2024-02-02 16:44:36 +01:00
PolyMeilex
6ef8125c96 Return OwnedFd from open_cloexec 2024-01-27 20:42:13 +01:00
PolyMeilex
2512849ece Use nix OFlag for open_cloexec 2024-01-27 20:42:13 +01:00
PolyMeilex
6915aeb44c Use nix mode for open_cloexec 2024-01-27 20:42:13 +01:00
PolyMeilex
23301e4895 Return Result from wopen_cloexec 2024-01-27 20:42:13 +01:00
ridiculousfish
3ce6a5fdd1 Make sets_bind_mode in input an Option<WString>
Previously this used an empty string to mean a sentinel; use an option instead.

Fixes a TODO.
2024-01-21 18:19:40 -08:00
ridiculousfish
b4b5cff3d8 Move input tests into their own module in the tests dir 2024-01-21 18:19:40 -08:00
PolyMeilex
f3e8272c5d Move from libc read/write to nix read/write
Replace std from_raw_fd/into_raw_fd dance with nix write

Fixup notifyd build
2024-01-21 11:49:40 -08:00
Fabian Boehm
f7b541af99 tests/parse_util: Check against localized message
This is run in the current locale, without resetting to en_US.UTF-8
like our integration tests do.

So if you want to check for a specific message you need to check the
localized version.
2024-01-20 12:28:59 +01:00
Himadri Bhattacharjee
e014c981f2 Disallow background operator before && or ||
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>

Closes #10228
Fixes #9911
2024-01-20 11:32:44 +01:00
Johannes Altmanninger
87d434a98d Improve failure message in test_error_messages 2024-01-20 11:30:13 +01:00
Johannes Altmanninger
7597288c18 test_error_messages: add back missing validation
Make sure to also look for the error part that occurs after the last format
specifier.

Still not great because it won't fail if there's unexpected output at the
beginning or end of the string.
2024-01-19 06:26:31 +01:00
ridiculousfish
8554eb5f80 Further cleanup of FdMonitor 2024-01-13 12:51:36 -08:00
ridiculousfish
d8da79717e Remove some FFI bits from FdMonitor 2024-01-13 12:51:36 -08:00
Mahmoud Al-Qudsi
195852b562 Use locale::LOCALE_LOCK for all setlocale() calls
I had originally created a safe `set_locale()` wrapper and clippy-disallowed
`libc::setlocale()` but almost all our uses of `libc::setlocale()` are in a loop
where it makes much more sense to just obtain the lock outright then call
`setlocale()` repeatedly rather than lock it in the wrapper function each time.
2024-01-13 13:50:31 -06:00
Fabian Boehm
0a92d03498 Remove L! from sprintf calls
Remove unnecessary L!
2024-01-13 08:52:54 +01:00
Fabian Boehm
09cd7c7ad9 Remove widestring-suffix uses
This removes both the `#[widestrs]` annotation as well as all `"foo"L`
suffixes, and does a `cargo fmt` run on the result
2024-01-13 08:52:54 +01:00
Johannes Altmanninger
3ae20bdba0 Move fish-rust to project root 2024-01-13 03:58:33 +01:00