ogham / rust-users

Library for Unix users and groups in Rust.
https://crates.io/crates/users
MIT License
98 stars 37 forks source link

Add support for NetBSD #26

Closed iquiw closed 6 years ago

iquiw commented 6 years ago

Test passed with rustc 1.25.0 (84203cac6 2018-03-25) on NetBSD amd64.

$ cargo test                                                                                         
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs                                                       
     Running target/debug/deps/users-03c12e2236b742fc                                                                  

running 17 tests                                                                                                       
test base::test::uid ... ok                                                                                            
test base::test::group_by_name ... ok                                                                                  
test base::test::user_by_name ... ok                                                                                   
test base::test::uid_for_username ... ok                                                                               
test base::test::user_info ... ok                                                                                      
test mock::test::gid ... ok                                                                                            
test base::test::username_for_uid_for_username ... ok                                                                  
test base::test::username ... ok                                                                                       
test mock::test::group_name ... ok                                                                                     
test mock::test::no_current_username ... ok                                                                            
test mock::test::no_gid ... ok                                                                                         
test mock::test::no_uid ... ok                                                                                         
test mock::test::no_username ... ok                                                                                    
test mock::test::current_username ... ok                                                                               
test mock::test::no_group_name ... ok                                                                                  
test mock::test::uid ... ok                                                                                            
test mock::test::username ... ok                                                                                       

test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out                                            

   Doc-tests users                                                                                                     

running 6 tests                                                                                                        
test src/lib.rs -  (line 97) ... ok                                                                                    
test src/lib.rs -  (line 42) ... ok                                                                                    
test src/lib.rs -  (line 73) ... ok                                                                                    
test src/switch.rs - switch::switch_user_group (line 127) ... ok                                                       
test src/mock.rs - mock (line 19) ... ok                                                                               
test src/mock.rs - mock (line 41) ... ok                                                                               

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
ogham commented 6 years ago

Hey @iquiw — thanks for the PR. I’ve merged it, but I had to move your edits because the code was changed by an earlier PR. Would you mind giving it another test to see if it still works?

It's released as v0.7.0.

iquiw commented 6 years ago

@ogham Thank you! Test passed as previous. (Tested with Rust 1.25 as official 1.26 is not available due to similar problem as https://github.com/rust-lang-nursery/rustup.rs/issues/1410)