Compare commits
1 Commits
master
...
PeterDaveH
Author | SHA1 | Date | |
---|---|---|---|
|
aff6fb4ac9 |
|
@ -12,7 +12,7 @@
|
||||||
"bin": "./urchin",
|
"bin": "./urchin",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.sdf.org/tlevine/urchin"
|
"url": "git://github.com/tlevine/urchin.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"shell",
|
"shell",
|
||||||
|
|
52
readme.md
52
readme.md
|
@ -1,5 +1,3 @@
|
||||||
**The repository at https://github.com/tlevine/urchin will go away. New location is https://git.sdf.org/tlevine/urchin.**
|
|
||||||
|
|
||||||
__ _
|
__ _
|
||||||
__ ____________/ /_ (_)___
|
__ ____________/ /_ (_)___
|
||||||
/ / / / ___/ ___/ __ \/ / __ \
|
/ / / / ___/ ___/ __ \/ / __ \
|
||||||
|
@ -19,12 +17,14 @@ have shells called "tests".
|
||||||
Urchin's tests are written in Urchin, so you can run them to see what Urchin
|
Urchin's tests are written in Urchin, so you can run them to see what Urchin
|
||||||
is like. Clone the repository
|
is like. Clone the repository
|
||||||
|
|
||||||
git clone https://git.sdf.org/tlevine/urchin
|
git clone git://github.com/tlevine/urchin.git
|
||||||
|
|
||||||
Run the tests
|
Run the tests
|
||||||
|
|
||||||
cd urchin
|
```sh
|
||||||
./urchin tests
|
cd urchin
|
||||||
|
./urchin tests
|
||||||
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
Urchin depends on the following programs.
|
Urchin depends on the following programs.
|
||||||
|
@ -52,9 +52,11 @@ of these programs.
|
||||||
Urchin is contained in a single file, so you can install it by copying it to a
|
Urchin is contained in a single file, so you can install it by copying it to a
|
||||||
directory in your `PATH`. For example, you can run the following as root.
|
directory in your `PATH`. For example, you can run the following as root.
|
||||||
|
|
||||||
cd /usr/local/bin
|
```sh
|
||||||
wget https://git.sdf.org/tlevine/urchin/raw/branch/master/urchin
|
cd /usr/local/bin
|
||||||
chmod +x urchin
|
wget https://raw.githubusercontent.com/tlevine/urchin/v0.1.0-rc3/urchin
|
||||||
|
chmod +x urchin
|
||||||
|
```
|
||||||
|
|
||||||
Urchin can be installed with npm too.
|
Urchin can be installed with npm too.
|
||||||
|
|
||||||
|
@ -112,9 +114,11 @@ directory tree. The test passes if the file exits 0; otherwise, it fails.
|
||||||
|
|
||||||
urchin looks for files within a directory in the following manner,
|
urchin looks for files within a directory in the following manner,
|
||||||
|
|
||||||
for file in *; do
|
```sh
|
||||||
do_something_with_test_file $file
|
for file in *; do
|
||||||
done
|
do_something_with_test_file $file
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
so files are run in whatever order `*` produces. The order is
|
so files are run in whatever order `*` produces. The order is
|
||||||
configured in your environment, at least in
|
configured in your environment, at least in
|
||||||
|
@ -127,18 +131,20 @@ order the tests ran in.
|
||||||
|
|
||||||
Below you can see how the locale can affect the order.
|
Below you can see how the locale can affect the order.
|
||||||
|
|
||||||
$ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort
|
```sh
|
||||||
!c
|
$ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort
|
||||||
@a
|
!c
|
||||||
~b
|
@a
|
||||||
$ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort
|
~b
|
||||||
@a
|
$ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort
|
||||||
~b
|
@a
|
||||||
!c
|
~b
|
||||||
$ printf '!c\n@a\n~b\n' | sort -d
|
!c
|
||||||
@a
|
$ printf '!c\n@a\n~b\n' | sort -d
|
||||||
~b
|
@a
|
||||||
!c
|
~b
|
||||||
|
!c
|
||||||
|
```
|
||||||
|
|
||||||
### Writing cross-shell compatibility tests for testing shell code
|
### Writing cross-shell compatibility tests for testing shell code
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user