Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Levine
4a65c416b1 GitHub-only note about repository address change 2022-12-25 11:03:28 +00:00
Thomas Levine
1d2231a415 Move repository to SDF server. 2022-12-25 10:57:40 +00:00
2 changed files with 24 additions and 30 deletions

View File

@ -12,7 +12,7 @@
"bin": "./urchin", "bin": "./urchin",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/tlevine/urchin.git" "url": "https://git.sdf.org/tlevine/urchin"
}, },
"keywords": [ "keywords": [
"shell", "shell",

View File

@ -1,3 +1,5 @@
**The repository at https://github.com/tlevine/urchin will go away. New location is https://git.sdf.org/tlevine/urchin.**
__ _ __ _
__ ____________/ /_ (_)___ __ ____________/ /_ (_)___
/ / / / ___/ ___/ __ \/ / __ \ / / / / ___/ ___/ __ \/ / __ \
@ -17,14 +19,12 @@ 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 git://github.com/tlevine/urchin.git git clone https://git.sdf.org/tlevine/urchin
Run the tests Run the tests
```sh cd urchin
cd urchin ./urchin tests
./urchin tests
```
## Dependencies ## Dependencies
Urchin depends on the following programs. Urchin depends on the following programs.
@ -52,11 +52,9 @@ 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.
```sh cd /usr/local/bin
cd /usr/local/bin wget https://git.sdf.org/tlevine/urchin/raw/branch/master/urchin
wget https://raw.githubusercontent.com/tlevine/urchin/v0.1.0-rc3/urchin chmod +x urchin
chmod +x urchin
```
Urchin can be installed with npm too. Urchin can be installed with npm too.
@ -114,11 +112,9 @@ 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,
```sh for file in *; do
for file in *; do do_something_with_test_file $file
do_something_with_test_file $file done
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
@ -131,20 +127,18 @@ 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.
```sh $ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort
$ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort !c
!c @a
@a ~b
~b $ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort
$ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort @a
@a ~b
~b !c
!c $ printf '!c\n@a\n~b\n' | sort -d
$ printf '!c\n@a\n~b\n' | sort -d @a
@a ~b
~b !c
!c
```
### Writing cross-shell compatibility tests for testing shell code ### Writing cross-shell compatibility tests for testing shell code