This website requires JavaScript.
Explore
Help
Register
Sign In
github-mirror
/
fish-shell
Watch
2
Star
0
Fork
0
You've already forked fish-shell
mirror of
https://github.com/fish-shell/fish-shell.git
synced
2024-12-24 18:53:51 +08:00
Code
Issues
Actions
4
Packages
Projects
Releases
Wiki
Activity
a809672412
fish-shell
/
fish-rust
/
src
/
tests
/
mod.rs
6 lines
73 B
Rust
Raw
Normal View
History
Unescape
Escape
Double the speed of `cargo test`, actually run test - Parallelize the slow tests if possible. - `test_convert_ascii` was missing a `#[test]` annotation
2023-07-05 22:07:37 +08:00
#[
cfg(test)
]
Migrate string and lock tests into their own files Get some stuff out of the common module, which is growing large. Also migrate the tests into "native" Rust tests so they will run in parallel. We have to use an explicit setlocale() call to get a multibyte locale, for the "crazy" tests.
2023-07-04 03:19:40 +08:00
mod
common
;
Port fd_monitor tests to rust This shows some of the ugliness of the rust borrow checker when it comes to safely implementing any sort of recursive access and the need to be overly explicit about which types are actually used across threads and which aren't. We're forced to use an `Arc` for `ItemMaker` (née `item_maker_t`) because there's no other way to make it clear that its lifetime will last longer than the FdMonitor's. But once we've created an `Arc<T>` we can't call `Arc::get_mut()` to get an `&mut T` once we've created even a single weak reference to the Arc (because that weak ref could be upgraded to a strong ref at any time). This means we need to finish configuring any non-atomic properties (such as `ItemMaker::always_exit`) before we initialize the callback (which needs an `Arc<ItemMaker>` to do its thing). Because rust doesn't like self-referential types and because of the fact that we now need to create both the `ItemMaker` and the `FdMonitorItem` separately before we set the callback (at which point it becomes impossible to get a mutable reference to the `ItemMaker`), `ItemMaker::item` is dropped from the struct and we instead have the "constructor" for `ItemMaker` take a reference to an `FdMonitor` instance and directly add itself to the monitor's set, meaning we don't need to move the item out of the `ItemMaker` in order to add it to the `FdMonitor` set later.
2023-03-05 13:49:17 +08:00
mod
fd_monitor
;
Double the speed of `cargo test`, actually run test - Parallelize the slow tests if possible. - `test_convert_ascii` was missing a `#[test]` annotation
2023-07-05 22:07:37 +08:00
#[
cfg(test)
]
Migrate string and lock tests into their own files Get some stuff out of the common module, which is growing large. Also migrate the tests into "native" Rust tests so they will run in parallel. We have to use an explicit setlocale() call to get a multibyte locale, for the "crazy" tests.
2023-07-04 03:19:40 +08:00
mod
string_escape
;
Reference in New Issue
Copy Permalink