@@ -248,7 +248,6 @@ fn test_nohup_stderr_to_stdout() {
248248 assert ! ( content. contains( "stderr message" ) ) ;
249249}
250250
251-
252251// Test nohup.out has 0600 permissions
253252#[ test]
254253#[ cfg( any(
@@ -274,7 +273,11 @@ fn test_nohup_output_permissions() {
274273 let metadata = std:: fs:: metadata ( at. plus ( "nohup.out" ) ) . unwrap ( ) ;
275274 let mode = metadata. permissions ( ) . mode ( ) ;
276275
277- assert_eq ! ( mode & 0o777 , 0o600 , "nohup.out should have 0600 permissions" ) ;
276+ assert_eq ! (
277+ mode & 0o777 ,
278+ 0o600 ,
279+ "nohup.out should have 0600 permissions"
280+ ) ;
278281}
279282
280283// Test that the fallback nohup.out (in $HOME) also has 0600 permissions
@@ -313,7 +316,9 @@ fn test_nohup_fallback_output_permissions() {
313316
314317 // Run nohup inside the read-only dir
315318 // This forces it to fail writing to CWD and fall back to custom HOME
316- ts. ucmd ( ) . env ( "HOME" , & home_dir_str) . current_dir ( & readonly_path)
319+ ts. ucmd ( )
320+ . env ( "HOME" , & home_dir_str)
321+ . current_dir ( & readonly_path)
317322 . terminal_simulation ( true )
318323 . arg ( "true" )
319324 . run ( ) ;
@@ -330,5 +335,9 @@ fn test_nohup_fallback_output_permissions() {
330335 let metadata = fs:: metadata ( home_nohup) . expect ( "nohup.out should have been created in HOME" ) ;
331336 let mode = metadata. permissions ( ) . mode ( ) ;
332337
333- assert_eq ! ( mode & 0o777 , 0o600 , "Fallback nohup.out should have 0600 permissions" ) ;
338+ assert_eq ! (
339+ mode & 0o777 ,
340+ 0o600 ,
341+ "Fallback nohup.out should have 0600 permissions"
342+ ) ;
334343}
0 commit comments