From 412025b45ab618913989ae2313acea390b2654cd Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Wed, 25 Nov 2015 03:36:28 -0500 Subject: [PATCH 1/3] Fix whitespace and sort order of tests. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bdeca59cf..6d5433b8b 100644 --- a/Makefile +++ b/Makefile @@ -127,9 +127,9 @@ TEST_PROGS := \ cksum \ cp \ cut \ - env \ dirname \ echo \ + env \ factor \ false \ fold \ @@ -159,8 +159,8 @@ TEST_PROGS := \ true \ truncate \ tsort \ - unlink \ unexpand \ + unlink \ wc TESTS := \ @@ -201,7 +201,7 @@ crates: echo "okay" $(EXES) build_uutils = ${CARGO} build --features "${1}" ${PROFILE_CMD} --no-default-features -build_pkg = ${CARGO} build ${PROFILE_CMD} -p "${1}" +build_pkg = ${CARGO} build ${PROFILE_CMD} -p ${1} run_integration_tests = ${CARGO} test --test ${1} run_unit_tests = ${CARGO} test -p ${1} do_install = install ${1} @@ -213,8 +213,8 @@ test: $(foreach util, ${TESTS}, $(call run_unit_tests, ${util});) build: - $(call build_uutils,${EXES}) - $(foreach util, ${EXES}, $(call build_pkg,${util});) + $(call build_uutils, ${EXES}) + $(foreach util, ${EXES}, $(call build_pkg, ${util});) clean: $(RM) -rf $(BUILDDIR) From 80f83ce15de85e71f6e9eddabbd82824e0ae0e59 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Wed, 25 Nov 2015 04:03:27 -0500 Subject: [PATCH 2/3] Remove unused file. --- tests/mod.rs | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tests/mod.rs diff --git a/tests/mod.rs b/tests/mod.rs deleted file mode 100644 index 34994bf5a..000000000 --- a/tests/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod common; From 55e53275730153929409145741d614b9e8b4379c Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Wed, 25 Nov 2015 04:01:53 -0500 Subject: [PATCH 3/3] Use name/version when showing hostname's usage. --- src/hostname/hostname.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hostname/hostname.rs b/src/hostname/hostname.rs index 1519bdbdc..4e01de294 100644 --- a/src/hostname/hostname.rs +++ b/src/hostname/hostname.rs @@ -27,6 +27,7 @@ use std::io::Write; use std::net::ToSocketAddrs; static NAME: &'static str = "hostname"; +static VERSION: &'static str = "1.0.0"; extern { fn gethostname(name: *mut libc::c_char, namelen: libc::size_t) -> libc::c_int; @@ -119,7 +120,7 @@ pub fn uumain(args: Vec) -> i32 { } fn version() { - println!("hostname 1.0.0"); + println!("{} {}", NAME, VERSION); } fn help_menu(program: &str, options: Options) {