mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
uucore::entries: Make Passwd::locate and Group::locate thread-safe
This commit is contained in:
parent
fe286fa8c8
commit
f2ddae93fa
6 changed files with 131 additions and 145 deletions
|
@ -24,14 +24,11 @@ fn test_capitalize() {
|
|||
fn test_long_format() {
|
||||
let login = "root";
|
||||
let pw: Passwd = Passwd::locate(login).unwrap();
|
||||
let real_name = pw.user_info().replace("&", &pw.name().capitalize());
|
||||
let real_name = pw.user_info.replace("&", &pw.name.capitalize());
|
||||
let ts = TestScenario::new(util_name!());
|
||||
ts.ucmd().arg("-l").arg(login).succeeds().stdout_is(format!(
|
||||
"Login name: {:<28}In real life: {}\nDirectory: {:<29}Shell: {}\n\n",
|
||||
login,
|
||||
real_name,
|
||||
pw.user_dir(),
|
||||
pw.user_shell()
|
||||
login, real_name, pw.user_dir, pw.user_shell
|
||||
));
|
||||
|
||||
ts.ucmd()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue