Better Debug for Vars and VarsOs
Display actual vars instead of two dots.
The same was done for Args and ArgsOs in 275f9a04af
.
This commit is contained in:
parent
fbc11e9690
commit
35c0c03a3c
9 changed files with 256 additions and 12 deletions
20
library/std/src/env/tests.rs
vendored
20
library/std/src/env/tests.rs
vendored
|
@ -95,8 +95,28 @@ fn args_debug() {
|
|||
format!("Args {{ inner: {:?} }}", args().collect::<Vec<_>>()),
|
||||
format!("{:?}", args())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn args_os_debug() {
|
||||
assert_eq!(
|
||||
format!("ArgsOs {{ inner: {:?} }}", args_os().collect::<Vec<_>>()),
|
||||
format!("{:?}", args_os())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vars_debug() {
|
||||
assert_eq!(
|
||||
format!("Vars {{ inner: {:?} }}", vars().collect::<Vec<_>>()),
|
||||
format!("{:?}", vars())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vars_os_debug() {
|
||||
assert_eq!(
|
||||
format!("VarsOs {{ inner: {:?} }}", vars_os().collect::<Vec<_>>()),
|
||||
format!("{:?}", vars_os())
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue