Skip to content

Commit 629cbb2

Browse files
committed
m4: Rename m4 package to posixutils-m4
1 parent 4f0621a commit 629cbb2

File tree

5 files changed

+37
-30
lines changed

5 files changed

+37
-30
lines changed

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

m4/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
[package]
2-
name = "m4"
2+
name = "posixutils-m4"
33
version = "0.1.0"
44
edition = "2021"
55
description = "m4 - macro language processor"
6+
authors = ["Luke Frisken"]
7+
license = "MIT"
8+
repository = "https://github.com/rustcoreutils/posixutils-rs.git"
9+
10+
[[bin]]
11+
name = "m4"
12+
path = "src/main.rs"
613

714
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
815

m4/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ fn main() {
189189
//! using the following command:
190190
//! `cargo run -p m4-test-manager update-snapshots`
191191
use similar_asserts::assert_eq;
192+
use posixutils_m4::error::GetExitCode;
192193
use std::process::ExitStatus;
193194
use std::os::unix::ffi::OsStrExt;
194195
use std::os::unix::process::ExitStatusExt;
195196
use std::fs::read_to_string;
196197
use std::path::Path;
197-
use m4::error::GetExitCode;
198198
use m4_test_manager::TestSnapshot;
199199
200200
fn init() {
@@ -256,11 +256,11 @@ fn run_command(input: &Path) -> std::process::Output {
256256
257257
let stdout = StdoutRef::default();
258258
let mut stderr: Vec<u8> = Vec::new();
259-
let args = m4::Args {
259+
let args = posixutils_m4::Args {
260260
files: vec![input.into()],
261-
..m4::Args::default()
261+
..posixutils_m4::Args::default()
262262
};
263-
let result = m4::run(stdout.clone(), &mut stderr, args);
263+
let result = posixutils_m4::run(stdout.clone(), &mut stderr, args);
264264
let status = ExitStatus::from_raw(result.get_exit_code() as i32);
265265
(stdout.into_inner(), stderr, status)
266266
}

m4/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::process::ExitCode;
22

3-
use m4::error::GetExitCode;
3+
use posixutils_m4::error::GetExitCode;
44

55
fn main() -> ExitCode {
66
env_logger::init();
7-
let args = m4::Args::parse();
7+
let args = posixutils_m4::Args::parse();
88

99
let stdout = std::io::stdout();
1010
let mut stderr = std::io::stderr();
11-
if let Err(error) = m4::run(stdout, &mut stderr, args) {
11+
if let Err(error) = posixutils_m4::run(stdout, &mut stderr, args) {
1212
ExitCode::from(u8::try_from(error.get_exit_code()).unwrap_or_else(|e| {
1313
eprintln!("Error casting exit code {e} into platform agnostic u8");
1414
1

m4/tests/integration_test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//! You can regenerate the tests (which are based on the fixtures in `fixtures/integration_tests/`)
33
//! using the following command:
44
//! `cargo run -p m4-test-manager update-snapshots`
5-
use m4::error::GetExitCode;
65
use m4_test_manager::TestSnapshot;
6+
use posixutils_m4::error::GetExitCode;
77
use similar_asserts::assert_eq;
88
use std::fs::read_to_string;
99
use std::os::unix::ffi::OsStrExt;
@@ -61,11 +61,11 @@ fn run_command(input: &Path) -> std::process::Output {
6161

6262
let stdout = StdoutRef::default();
6363
let mut stderr: Vec<u8> = Vec::new();
64-
let args = m4::Args {
64+
let args = posixutils_m4::Args {
6565
files: vec![input.into()],
66-
..m4::Args::default()
66+
..posixutils_m4::Args::default()
6767
};
68-
let result = m4::run(stdout.clone(), &mut stderr, args);
68+
let result = posixutils_m4::run(stdout.clone(), &mut stderr, args);
6969
let status = ExitStatus::from_raw(result.get_exit_code() as i32);
7070
(stdout.into_inner(), stderr, status)
7171
}

0 commit comments

Comments
 (0)