mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Create the uutest crate + adjust the code
+ move some of the tests into the program test
This commit is contained in:
parent
bf337a29af
commit
50fe623447
11 changed files with 211 additions and 64 deletions
|
@ -2,8 +2,19 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
#[macro_use]
|
||||
mod common;
|
||||
|
||||
// Then override the macro with your constant
|
||||
use std::env;
|
||||
|
||||
pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils");
|
||||
|
||||
// Use the ctor attribute to run this function before any tests
|
||||
#[ctor::ctor]
|
||||
fn init() {
|
||||
unsafe {
|
||||
std::env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "arch")]
|
||||
#[path = "by-util/test_arch.rs"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue