Syntax highlight in readme.md

This commit is contained in:
Peter Dave Hello 2017-03-16 04:36:40 +08:00 committed by GitHub
parent 9721f976e0
commit aff6fb4ac9

View File

@ -21,8 +21,10 @@ is like. Clone the repository
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.
@ -50,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.
```sh
cd /usr/local/bin cd /usr/local/bin
wget https://raw.githubusercontent.com/tlevine/urchin/v0.1.0-rc3/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.
@ -110,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,
```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
@ -125,6 +131,7 @@ 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
@ -137,6 +144,7 @@ Below you can see how the locale can affect the order.
@a @a
~b ~b
!c !c
```
### Writing cross-shell compatibility tests for testing shell code ### Writing cross-shell compatibility tests for testing shell code