mirror of
https://github.com/sayanarijit/xplr
synced 2024-11-10 07:10:45 +00:00
Fix NixOS tests
This commit is contained in:
parent
59c8db821b
commit
c89d5a45f1
@ -109,7 +109,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_explore_sync() {
|
fn test_explore_sync() {
|
||||||
let config = ExplorerConfig::default();
|
let config = ExplorerConfig::default();
|
||||||
let path = PathBuf::from("/bin");
|
let path = PathBuf::from(".");
|
||||||
|
|
||||||
let r = explore_sync(config, path, None, 0);
|
let r = explore_sync(config, path, None, 0);
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_explore_async() {
|
fn test_explore_async() {
|
||||||
let config = ExplorerConfig::default();
|
let config = ExplorerConfig::default();
|
||||||
let path = PathBuf::from("/usr/bin");
|
let path = PathBuf::from(".");
|
||||||
let (tx_msg_in, rx_msg_in) = mpsc::channel();
|
let (tx_msg_in, rx_msg_in) = mpsc::channel();
|
||||||
|
|
||||||
explore_async(config, path, None, 0, tx_msg_in.clone());
|
explore_async(config, path, None, 0, tx_msg_in.clone());
|
||||||
@ -155,7 +155,7 @@ mod tests {
|
|||||||
let task = rx_msg_in.recv().unwrap();
|
let task = rx_msg_in.recv().unwrap();
|
||||||
let dbuf = extract_dirbuf_from_msg(task.msg);
|
let dbuf = extract_dirbuf_from_msg(task.msg);
|
||||||
|
|
||||||
assert_eq!(dbuf.parent, "/usr/bin");
|
assert_eq!(dbuf.parent, ".");
|
||||||
|
|
||||||
drop(tx_msg_in);
|
drop(tx_msg_in);
|
||||||
assert!(rx_msg_in.recv().is_err());
|
assert!(rx_msg_in.recv().is_err());
|
||||||
|
Loading…
Reference in New Issue
Block a user