Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ temporarily disable tests which vary by 'windows' hosts'

This commit is contained in:
Roy Ivy III
2020-01-22 19:46:04 -06:00
parent 26ef8c3e59
commit affafcc5f2
+6 -12
View File
@@ -11,7 +11,7 @@ use tempfile::Builder;
use tempfile::TempDir; use tempfile::TempDir;
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_main() { pub fn test_main() {
assert_cli::Assert::main_binary() assert_cli::Assert::main_binary()
@@ -22,7 +22,7 @@ pub fn test_main() {
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_main_long_paths() { pub fn test_main_long_paths() {
assert_cli::Assert::main_binary() assert_cli::Assert::main_binary()
@@ -33,7 +33,7 @@ pub fn test_main_long_paths() {
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_main_multi_arg() { pub fn test_main_multi_arg() {
assert_cli::Assert::main_binary() assert_cli::Assert::main_binary()
@@ -81,8 +81,6 @@ fn main_output(short_paths: bool) -> String {
) )
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[allow(dead_code)]
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
fn main_output(short_paths: bool) -> String { fn main_output(short_paths: bool) -> String {
let d = DisplayData { let d = DisplayData {
@@ -109,7 +107,7 @@ fn main_output(short_paths: bool) -> String {
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_no_color_flag() { pub fn test_no_color_flag() {
assert_cli::Assert::main_binary() assert_cli::Assert::main_binary()
@@ -141,8 +139,6 @@ fn no_color_flag_output() -> String {
.to_string() .to_string()
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[allow(dead_code)]
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
fn no_color_flag_output() -> String { fn no_color_flag_output() -> String {
" "
@@ -155,7 +151,7 @@ fn no_color_flag_output() -> String {
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_apparent_size() { pub fn test_apparent_size() {
let d = DisplayData { let d = DisplayData {
@@ -323,7 +319,7 @@ pub fn test_recursive_sym_link() {
// Check against directories and files whos names are substrings of each other // Check against directories and files whos names are substrings of each other
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable // fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[cfg(not(target_os = "windows"))] #[cfg_attr(target_os = "windows", ignore)]
#[test] #[test]
pub fn test_substring_of_names() { pub fn test_substring_of_names() {
assert_cli::Assert::main_binary() assert_cli::Assert::main_binary()
@@ -359,8 +355,6 @@ fn no_substring_of_names_output() -> String {
.into() .into()
} }
// fix! [rivy; 2020-22-01] "windows" result data can vary by host (size seems to be variable by one byte); fix code vs test and re-enable
#[allow(dead_code)]
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
fn no_substring_of_names_output() -> String { fn no_substring_of_names_output() -> String {
" "