From 91a4467f3ec3dfe8ce53e2ad624410ad840fd747 Mon Sep 17 00:00:00 2001 From: Thomas Levine Date: Thu, 27 Jun 2013 11:33:16 -0700 Subject: [PATCH 1/4] cross-shell test runner in runtests --- .gitignore | 1 + runtests | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .gitignore create mode 100755 runtests diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ca6e37 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.urchin_stdout diff --git a/runtests b/runtests new file mode 100755 index 0000000..4b252b3 --- /dev/null +++ b/runtests @@ -0,0 +1,14 @@ +#!/bin/sh +# Run urchin in a bunch of different shells, +# including a shell that isn't quite POSIX-compatible (zsh) + +for shell in dash bash ksh oksh pdksh zsh; do + if which $shell > /dev/null 2> /dev/null; then + echo + echo Running urchin tests in $shell + $shell urchin tests | tail -n 2 + else + echo + echo Skipping $shell because it is not in the PATH + fi +done -- 2.39.5 From da9a0c99482cca52c22fdd172f79c47fee73e8be Mon Sep 17 00:00:00 2001 From: Thomas Levine Date: Thu, 27 Jun 2013 11:44:19 -0700 Subject: [PATCH 2/4] documentation --- runtests => cross-shell-tests | 1 + readme.md | 6 ++++++ 2 files changed, 7 insertions(+) rename runtests => cross-shell-tests (98%) diff --git a/runtests b/cross-shell-tests similarity index 98% rename from runtests rename to cross-shell-tests index 4b252b3..630816f 100755 --- a/runtests +++ b/cross-shell-tests @@ -12,3 +12,4 @@ for shell in dash bash ksh oksh pdksh zsh; do echo Skipping $shell because it is not in the PATH fi done +echo diff --git a/readme.md b/readme.md index 2007415..fdde399 100644 --- a/readme.md +++ b/readme.md @@ -19,6 +19,12 @@ Run the tests cd urchin/tests ../urchin . +The above command will run the tests in your login shell; to test cross-shell +compatibility, run this. + + cd urchin + ./cross-shell-tests + ## Globally Download Urchin like so (as root) (or use npm, below): -- 2.39.5 From a749c8dae358b1177954b769ba1aeb6feaf50e1d Mon Sep 17 00:00:00 2001 From: Thomas Levine Date: Thu, 27 Jun 2013 11:45:05 -0700 Subject: [PATCH 3/4] fix urchin call in XSD test --- tests/XSD output should work./XSD output should produce XML. | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/XSD output should work./XSD output should produce XML. b/tests/XSD output should work./XSD output should produce XML. index effd0c6..7dd4b4e 100755 --- a/tests/XSD output should work./XSD output should produce XML. +++ b/tests/XSD output should work./XSD output should produce XML. @@ -1,3 +1,3 @@ #!/bin/sh -../../../urchin .fixture | grep 'http://www.w3.org/2001/XMLSchema' +../../urchin .fixture | grep 'http://www.w3.org/2001/XMLSchema' -- 2.39.5 From 5aace72fc6ec7f94c241a16aaeacb634d11614e4 Mon Sep 17 00:00:00 2001 From: Thomas Levine Date: Thu, 27 Jun 2013 11:45:45 -0700 Subject: [PATCH 4/4] remove conflicting ksh calls --- cross-shell-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross-shell-tests b/cross-shell-tests index 630816f..21902a5 100755 --- a/cross-shell-tests +++ b/cross-shell-tests @@ -2,7 +2,7 @@ # Run urchin in a bunch of different shells, # including a shell that isn't quite POSIX-compatible (zsh) -for shell in dash bash ksh oksh pdksh zsh; do +for shell in dash bash ksh zsh; do if which $shell > /dev/null 2> /dev/null; then echo echo Running urchin tests in $shell -- 2.39.5