From 0c2be40afc2abceaeca2631c3cce78639307dd31 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Mon, 3 Jun 2019 13:26:29 +1200 Subject: [PATCH] Fix integration tests for Linux --- src/tests.rs | 6 +++--- tests/json_roundtrip.out | 2 +- tests/json_roundtrip.txt | 3 ++- tests/open_json.txt | 3 ++- tests/open_toml.txt | 3 ++- tests/sort_by.txt | 3 ++- tests/split.out | 3 +-- tests/split.txt | 3 ++- tests/toml_roundtrip.txt | 3 ++- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/tests.rs b/src/tests.rs index 13142dde..338cc05c 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -55,12 +55,12 @@ mod tests { } #[test] - fn test_toml() { + fn open_toml() { test_helper("open_toml"); } #[test] - fn test_json() { + fn open_json() { test_helper("open_json"); } @@ -83,4 +83,4 @@ mod tests { fn split() { test_helper("split"); } -} \ No newline at end of file +} diff --git a/tests/json_roundtrip.out b/tests/json_roundtrip.out index ba2d8d98..37622491 100644 --- a/tests/json_roundtrip.out +++ b/tests/json_roundtrip.out @@ -1 +1 @@ -"example glossary" +S diff --git a/tests/json_roundtrip.txt b/tests/json_roundtrip.txt index 285697ec..dc8c6028 100644 --- a/tests/json_roundtrip.txt +++ b/tests/json_roundtrip.txt @@ -1,2 +1,3 @@ -open tests\test.json | to-json | from-json | select glossary.title | echo $it +cd tests +open test.json | to-json | from-json | select glossary.GlossDiv.title | echo $it exit diff --git a/tests/open_json.txt b/tests/open_json.txt index 9126fb3f..63200048 100644 --- a/tests/open_json.txt +++ b/tests/open_json.txt @@ -1,2 +1,3 @@ -open tests\test.json | select glossary.GlossDiv.GlossList.GlossEntry.GlossSee | echo $it +cd tests +open test.json | select glossary.GlossDiv.GlossList.GlossEntry.GlossSee | echo $it exit diff --git a/tests/open_toml.txt b/tests/open_toml.txt index 4c93effa..41ebdad8 100644 --- a/tests/open_toml.txt +++ b/tests/open_toml.txt @@ -1,2 +1,3 @@ -open tests\test.toml | select package.edition | echo $it +cd tests +open test.toml | select package.edition | echo $it exit diff --git a/tests/sort_by.txt b/tests/sort_by.txt index 235c76b8..be00978d 100644 --- a/tests/sort_by.txt +++ b/tests/sort_by.txt @@ -1,2 +1,3 @@ -open tests\test.toml --raw | split-row "\n" | skip 1 | first 4 | split-column "=" | sort-by Column1 | skip 1 | first 1 | select Column1 | trim | echo $it +cd tests +open test.toml --raw | split-row "\n" | skip 1 | first 4 | split-column "=" | sort-by Column1 | skip 1 | first 1 | select Column1 | trim | echo $it exit diff --git a/tests/split.out b/tests/split.out index 4c45f117..f121bdbf 100644 --- a/tests/split.out +++ b/tests/split.out @@ -1,2 +1 @@ -name -version +name diff --git a/tests/split.txt b/tests/split.txt index 8b8189f4..67a98045 100644 --- a/tests/split.txt +++ b/tests/split.txt @@ -1,2 +1,3 @@ -open tests\test.toml --raw | split-row "\n" | skip 1 | first 2 | split-column "=" | select Column1 | trim | echo $it +cd tests +open test.toml --raw | split-row "\n" | skip 1 | first 1 | split-column "=" | select Column1 | trim | echo $it exit diff --git a/tests/toml_roundtrip.txt b/tests/toml_roundtrip.txt index 1d150b94..a519fbe8 100644 --- a/tests/toml_roundtrip.txt +++ b/tests/toml_roundtrip.txt @@ -1,2 +1,3 @@ -open tests\test.toml | to-toml | from-toml | select package.name | echo $it +cd tests +open test.toml | to-toml | from-toml | select package.name | echo $it exit