mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
@@ -67,6 +67,7 @@ PROGS := \
|
||||
od \
|
||||
paste \
|
||||
printenv \
|
||||
ptx \
|
||||
pwd \
|
||||
readlink \
|
||||
realpath \
|
||||
@@ -173,6 +174,7 @@ TEST_PROGS := \
|
||||
mv \
|
||||
nl \
|
||||
paste \
|
||||
ptx \
|
||||
pwd \
|
||||
readlink \
|
||||
rm \
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DEPLIBS += regex
|
||||
+561
File diff suppressed because it is too large
Load Diff
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
maybe
|
||||
about
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
hello world!
|
||||
let's check special characters:
|
||||
"quotes", for roff
|
||||
{brackets} for tex
|
||||
and some other like %a, b#, c$c
|
||||
maybe also~or^
|
||||
oh, and back\slash
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
roff
|
||||
tex
|
||||
world
|
||||
maybe
|
||||
about
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
use std::process::Command;
|
||||
use util::*;
|
||||
|
||||
static PROGNAME: &'static str = "./ptx";
|
||||
|
||||
#[path = "common/util.rs"]
|
||||
#[macro_use]
|
||||
mod util;
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_roff_no_ref() {
|
||||
let opts = vec!["-G", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_roff_input_ref() {
|
||||
let opts = vec!["-G", "-r", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_roff_auto_ref() {
|
||||
let opts = vec!["-G", "-A", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_tex_no_ref() {
|
||||
let opts = vec!["-G", "-T", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_tex_input_ref() {
|
||||
let opts = vec!["-G", "-T", "-r", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_tex_auto_ref() {
|
||||
let opts = vec!["-G", "-T", "-A", "-R"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gnu_ext_disabled_ignore_and_only_file() {
|
||||
let opts = vec!["-G", "-o", "only", "-i", "ignore"];
|
||||
test_ptx(&opts);
|
||||
}
|
||||
|
||||
fn test_ptx(opts: &Vec<&str>) {
|
||||
let mut ptx = Command::new(PROGNAME);
|
||||
let result = run(&mut ptx.args(opts).arg("input"));
|
||||
let mut gnu_ptx = Command::new("ptx");
|
||||
let gnu_result = run(&mut gnu_ptx.args(opts).arg("input"));
|
||||
assert_eq!(result.success, true);
|
||||
assert_eq!(result.stdout, gnu_result.stdout);
|
||||
assert_empty_stderr!(&result);
|
||||
}
|
||||
Reference in New Issue
Block a user