Fix tests.
This commit is contained in:
+3
-3
@@ -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()
|
||||
)
|
||||
|
||||
+2
-2
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user