From 42219c391db13605804b247cffbf8716f25f79ab Mon Sep 17 00:00:00 2001 From: Lukas Wurzinger Date: Sun, 20 Nov 2022 12:41:10 +0100 Subject: [PATCH] make test.(ba)sh less annoying --- .gitignore | 1 + README.md | 3 +-- test/{test.sh => test.bash} | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) rename test/{test.sh => test.bash} (79%) diff --git a/.gitignore b/.gitignore index 30953ed..d58fae1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.o test +!test/ .ninja_deps .ninja_log diff --git a/README.md b/README.md index ed5e7ca..fecefd4 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,7 @@ It is required that one file in your project defines the as with any other single-header library. An example for how to use readarg can be found in `test/test.c`. If you want to -see how readarg represents options and operands, execute `test.sh` in the same -directory. +see how readarg represents options and operands, run `test.bash`. ## Terminology diff --git a/test/test.sh b/test/test.bash similarity index 79% rename from test/test.sh rename to test/test.bash index fa50619..85a03b4 100755 --- a/test/test.sh +++ b/test/test.bash @@ -1,4 +1,7 @@ -#!/bin/sh +#!/usr/bin/env bash + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null + ./test \ -e a \ --expr b \