2015-11-16 05:25:01 +00:00
|
|
|
use common::util::*;
|
2015-05-30 07:34:23 +00:00
|
|
|
|
2015-11-16 05:25:01 +00:00
|
|
|
static UTIL_NAME: &'static str = "ptx";
|
2015-05-30 07:34:23 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_roff_no_ref() {
|
|
|
|
let opts = vec!["-G", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_roff_no_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_roff_input_ref() {
|
|
|
|
let opts = vec!["-G", "-r", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_roff_input_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_roff_auto_ref() {
|
|
|
|
let opts = vec!["-G", "-A", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_roff_auto_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_tex_no_ref() {
|
|
|
|
let opts = vec!["-G", "-T", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_tex_no_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_tex_input_ref() {
|
|
|
|
let opts = vec!["-G", "-T", "-r", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_tex_input_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_tex_auto_ref() {
|
|
|
|
let opts = vec!["-G", "-T", "-A", "-R"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_tex_auto_ref.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn gnu_ext_disabled_ignore_and_only_file() {
|
|
|
|
let opts = vec!["-G", "-o", "only", "-i", "ignore"];
|
2015-06-05 23:55:02 +00:00
|
|
|
test_ptx(&opts, "gnu_ext_disabled_ignore_and_only_file.expected");
|
2015-05-30 07:34:23 +00:00
|
|
|
}
|
|
|
|
|
2015-06-05 23:55:02 +00:00
|
|
|
fn test_ptx(opts: &Vec<&str>, expected: &str) {
|
2015-11-16 05:25:01 +00:00
|
|
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
|
|
|
let result = ucmd.args(opts).arg("input").run();
|
2015-06-05 23:55:02 +00:00
|
|
|
assert!(result.success);
|
2015-11-16 05:25:01 +00:00
|
|
|
assert_eq!(result.stdout, at.read(expected));
|
2015-05-30 07:34:23 +00:00
|
|
|
assert_empty_stderr!(&result);
|
2015-06-05 23:55:02 +00:00
|
|
|
}
|