Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename plib-testing #368

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ members = [
"misc",
"pathnames",
"plib",
"plib-testing",
"process",
"sccs",
"screen",
Expand All @@ -41,6 +42,8 @@ libc = "0.2"
regex = "1.10"
gettext-rs = { path = "./gettext-rs" }
errno = "0.3"
plib = { path = "./plib" }
plib-testing = { path = "./plib-testing" }
ftw = { path = "./ftw" }

[workspace.lints]

2 changes: 1 addition & 1 deletion awk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lexical = { version = "6.1", features = ["format"] }
rand = {version = "0.8", default-features = false, features = ["small_rng"] }

[dev-dependencies]
plib = { path = "../plib" }
plib-testing.workspace = true

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion awk/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use plib::testing::{run_test, run_test_with_checker, TestPlan};
use plib_testing::{run_test, run_test_with_checker, TestPlan};

fn test_awk(args: Vec<String>, expected_output: &str) {
run_test(TestPlan {
Expand Down
2 changes: 1 addition & 1 deletion calc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bigdecimal = "0.4"
rustyline = { version = "14.0", default-features = false }

[dev-dependencies]
plib = { path = "../plib" }
plib-testing.workspace = true

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion calc/tests/bc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn test_bc(program: &str, expected_output: &str) {
run_test(TestPlan {
Expand Down
2 changes: 1 addition & 1 deletion calc/tests/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn expr_test(args: &[&str], expected_output: &str) {
let str_args: Vec<String> = args.iter().map(|s| String::from(*s)).collect();
Expand Down
2 changes: 1 addition & 1 deletion datetime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ chrono.workspace = true
libc.workspace = true

[dev-dependencies]
plib = { path = "../plib" }
plib-testing.workspace = true

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion datetime/tests/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::{
process::{Command, Output, Stdio},
};

use plib::testing::TestPlan;
use plib_testing::TestPlan;

fn run_test_base(cmd: &str, args: &Vec<String>, stdin_data: &[u8]) -> Output {
let relpath = if cfg!(debug_assertions) {
Expand Down
2 changes: 1 addition & 1 deletion dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ chrono.workspace = true
ar = "0.9"

[dev-dependencies]
plib = { path = "../plib" }
plib-testing.workspace = true

[lints]
workspace = true
Expand Down
5 changes: 3 additions & 2 deletions dev/tests/dev-tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use object::{Object, ObjectSection, ObjectSymbol};
use plib::testing::{run_test, run_test_with_checker, TestPlan};
use std::fs;

use object::{Object, ObjectSection, ObjectSymbol};
use plib_testing::{run_test, run_test_with_checker, TestPlan};

fn ar_compare_test(
args: &[&str],
stdout: &str,
Expand Down
2 changes: 1 addition & 1 deletion display/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ termion = "4.0"
thiserror = "1.0"

[dev-dependencies]
plib = { path = "../plib" }
plib-testing.workspace = true

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion display/tests/echo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn echo_test(args: &[&str], expected_output: &str) {
let str_args: Vec<String> = args.iter().map(|s| String::from(*s)).collect();
Expand Down
2 changes: 1 addition & 1 deletion display/tests/more/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use std::process::Output;

use plib::testing::{run_test_with_checker, TestPlan};
use plib_testing::{run_test_with_checker, TestPlan};

fn test_checker_more(plan: &TestPlan, output: &Output) {
let stdout = String::from_utf8_lossy(&output.stdout);
Expand Down
2 changes: 1 addition & 1 deletion display/tests/printf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

#[test]
fn test_basic_string_output() {
Expand Down
5 changes: 4 additions & 1 deletion file/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ edition.workspace = true
rust-version.workspace = true

[dependencies]
plib = { path = "../plib" }
plib.workspace = true
clap.workspace = true
gettext-rs.workspace = true
libc.workspace = true
regex.workspace = true
walkdir = "2"
users = "0.11"

[dev-dependencies]
plib-testing.workspace = true

[lints]
workspace = true

Expand Down
2 changes: 1 addition & 1 deletion file/tests/cmp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn run_test_helper(
args: &[&str],
Expand Down
2 changes: 1 addition & 1 deletion file/tests/dd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::File;
use std::io::Read;
use std::path::PathBuf;

use plib::testing::{run_test_u8, TestPlanU8};
use plib_testing::{run_test_u8, TestPlanU8};

fn get_test_file_path(filename: &str) -> PathBuf {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Expand Down
2 changes: 1 addition & 1 deletion file/tests/file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use std::{env, path::PathBuf};

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn file_test(args: &[&str], expected_output: &str, expected_error: &str) {
let str_args: Vec<String> = args.iter().map(|s| String::from(*s)).collect();
Expand Down
2 changes: 1 addition & 1 deletion file/tests/find/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fs::{remove_file, File};
use std::io::Write;

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn run_test_find(
args: &[&str],
Expand Down
2 changes: 1 addition & 1 deletion file/tests/od/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test, TestPlan};
use plib_testing::{run_test, TestPlan};

fn od_test(args: &[&str], test_data: &str, expected_output: &str) {
let str_args: Vec<String> = args.iter().map(|s| String::from(*s)).collect();
Expand Down
5 changes: 4 additions & 1 deletion i18n/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ edition.workspace = true
rust-version.workspace = true

[dependencies]
plib = { path = "../plib" }
plib.workspace = true
clap.workspace = true
gettext-rs.workspace = true
bytemuck = { version = "1.17", features = ["derive"] }
byteorder = "1.5"
strum = "0.26"
strum_macros = "0.26"

[dev-dependencies]
plib-testing.workspace = true

[lints]
workspace = true

Expand Down
3 changes: 2 additions & 1 deletion i18n/tests/gencat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
// SPDX-License-Identifier: MIT
//

use plib::testing::{run_test_u8, TestPlanU8};
use std::env;
use std::path::PathBuf;
use std::{fs::File, io::Read};

use plib_testing::{run_test_u8, TestPlanU8};

fn gencat_test(args: &[&str], expected_output: Vec<u8>, expected_error: Vec<u8>) {
let str_args: Vec<String> = args.iter().map(|s| String::from(*s)).collect();
run_test_u8(TestPlanU8 {
Expand Down
Loading