From 41a32480840ab746436425f751669b2b6ededf79 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Wed, 28 Dec 2022 17:18:37 +0100 Subject: [PATCH] Fix tests. --- src/repl.rs | 6 +++--- src/structs.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/repl.rs b/src/repl.rs index d3e8101..039c027 100644 --- a/src/repl.rs +++ b/src/repl.rs @@ -193,7 +193,7 @@ mod tests { assert_eq!( LKEval::news(Command::Ls(".".to_string()), lk.clone()).eval(), LKPrint::new( - LKOut::from_vecs(vec![" 1 t1 R 99 2022-12-30 comment".to_string()], vec![]), + LKOut::from_vecs(vec![" 1 t1 R 99 2022-12-30 comment".to_string()], vec![]), false, lk.clone() ) @@ -222,7 +222,7 @@ mod tests { LKEval::news(Command::Ls(".".to_string()), lk.clone()).eval(), LKPrint::new( LKOut::from_vecs( - vec![" 1 t1 R 99 2022-12-30 comment".to_string(), " 2 t2 R 99 2022-12-31 bli blup".to_string()], + vec![" 1 t1 R 99 2022-12-30 comment".to_string(), " 2 t2 R 99 2022-12-31 bli blup".to_string()], vec![] ), false, @@ -236,7 +236,7 @@ mod tests { assert_eq!( LKEval::news(Command::Ls(".".to_string()), lk.clone()).eval(), LKPrint::new( - LKOut::from_vecs(vec![" 1 t1 R 99 2022-12-30 comment".to_string()], vec![]), + LKOut::from_vecs(vec![" 1 t1 R 99 2022-12-30 comment".to_string()], vec![]), false, lk.clone() ) diff --git a/src/structs.rs b/src/structs.rs index 20c7ef8..768d5c5 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -346,7 +346,7 @@ mod tests { create_init(); create_pb(); - let lkread = init(); + let lkread = init().unwrap(); assert_eq!(lkread.prompt, "test> "); assert_eq!(lkread.state.borrow().db.contains_key("t1"), true); @@ -388,7 +388,7 @@ mod tests { .print(); assert_eq!( std::fs::read_to_string("test_dump").expect("read"), - "add t1 R 99 2022-10-10\nadd t2 R 99 2022-10-10 test ^t1\nadd t3 R 99 2022-10-10 aoeu ^t2\n".to_string() + "add t1 R 99 2022-10-10\nadd t2 R 99 2022-10-10 test ^t1\nadd t3 R 99 2022-10-10 aoeu ^t2\n".to_string() ); let pr = LKEval::new(command_parser::cmd("enc t3").unwrap(), lkread.state.clone(), |v| {