Add debugging output in test via logger
This commit is contained in:
parent
3bf3a8890b
commit
f01a262bdf
1 changed files with 14 additions and 4 deletions
|
@ -987,7 +987,10 @@ Hai
|
||||||
fn test_entry_from_str() {
|
fn test_entry_from_str() {
|
||||||
use super::Entry;
|
use super::Entry;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
println!("{}", TEST_ENTRY);
|
|
||||||
|
setup_logging();
|
||||||
|
|
||||||
|
debug!("{}", TEST_ENTRY);
|
||||||
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
||||||
TEST_ENTRY).unwrap();
|
TEST_ENTRY).unwrap();
|
||||||
|
|
||||||
|
@ -998,7 +1001,10 @@ Hai
|
||||||
fn test_entry_to_str() {
|
fn test_entry_to_str() {
|
||||||
use super::Entry;
|
use super::Entry;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
println!("{}", TEST_ENTRY);
|
|
||||||
|
setup_logging();
|
||||||
|
|
||||||
|
debug!("{}", TEST_ENTRY);
|
||||||
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
||||||
TEST_ENTRY).unwrap();
|
TEST_ENTRY).unwrap();
|
||||||
let string = entry.to_str().unwrap();
|
let string = entry.to_str().unwrap();
|
||||||
|
@ -1010,7 +1016,10 @@ Hai
|
||||||
fn test_entry_to_str_trailing_newline() {
|
fn test_entry_to_str_trailing_newline() {
|
||||||
use super::Entry;
|
use super::Entry;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
println!("{}", TEST_ENTRY_TNL);
|
|
||||||
|
setup_logging();
|
||||||
|
|
||||||
|
debug!("{}", TEST_ENTRY_TNL);
|
||||||
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
let entry = Entry::from_str(StoreId::new_baseless(PathBuf::from("test/foo~1.3")).unwrap(),
|
||||||
TEST_ENTRY_TNL).unwrap();
|
TEST_ENTRY_TNL).unwrap();
|
||||||
let string = entry.to_str().unwrap();
|
let string = entry.to_str().unwrap();
|
||||||
|
@ -1175,6 +1184,7 @@ mod store_tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_store_move_moves_in_hm() {
|
fn test_store_move_moves_in_hm() {
|
||||||
use storeid::StoreId;
|
use storeid::StoreId;
|
||||||
|
setup_logging();
|
||||||
|
|
||||||
let store = get_store();
|
let store = get_store();
|
||||||
|
|
||||||
|
@ -1197,7 +1207,7 @@ mod store_tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
let r = store.move_by_id(id.clone(), id_mv.clone());
|
let r = store.move_by_id(id.clone(), id_mv.clone());
|
||||||
assert!(r.map_err(|e| println!("ERROR: {:?}", e)).is_ok());
|
assert!(r.map_err(|e| debug!("ERROR: {:?}", e)).is_ok());
|
||||||
|
|
||||||
{
|
{
|
||||||
let id_mv_with_base = id_mv.clone().with_base(store.path().clone());
|
let id_mv_with_base = id_mv.clone().with_base(store.path().clone());
|
||||||
|
|
Loading…
Reference in a new issue