Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: pre-commit
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
Expand All @@ -25,8 +25,8 @@ jobs:
with:
path: |
~/.cache/pre-commit/
bash_unit
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
key:
pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
}}
- name: Run pre-commit hooks
env:
Expand All @@ -52,8 +52,8 @@ jobs:
with:
path: |
~/.cache/pre-commit/
bash_unit
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
key:
pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
}}
- name: Provide log as artifact
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Share your success with bash_unit on your blog, twitter, stackoverflow...
Nice words to share your experience with bash_unit is always appreciated.
If you want to say something nice about bash_unit but can not think of a
place for that right now, just add a comment to
[issue #37](https://github.com/pgrange/bash_unit/issues/37).
[issue #37](https://github.com/bash-unit/bash_unit/issues/37).

Starring the project is also appreciated.

# Suggest improvements

When you see something that is not working with bash_unit, or if you feel
something is missing, open an
[issue](https://github.com/pgrange/bash_unit/issues).
[issue](https://github.com/bash-unit/bash_unit/issues).

Opening issues helps improving bash_unit.

Expand All @@ -32,7 +32,7 @@ and create a pull-request.

You can contribute with new features you think are missing but you can
also find inspiration with the
[open issues](https://github.com/pgrange/bash_unit/issues) of bash_unit.
[open issues](https://github.com/bash-unit/bash_unit/issues) of bash_unit.

See [how to contribute code](CONTRIBUTING_CODE.md).

Expand Down
12 changes: 6 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ ifndef::backend-manpage[]

This will install *bash_unit* in your current working directory:

curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh | bash
curl -s https://raw.githubusercontent.com/bash-unit/bash_unit/master/install.sh | bash

You can also download it from the https://github.com/pgrange/bash_unit/releases[release page].
You can also download it from the https://github.com/bash-unit/bash_unit/releases[release page].

endif::[]

Expand All @@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v4
- name: Unit testing with bash_unit
run: |
curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh | bash
curl -s https://raw.githubusercontent.com/bash-unit/bash_unit/master/install.sh | bash
FORCE_COLOR=true ./bash_unit tests/test_*
```

Expand All @@ -144,7 +144,7 @@ test:
script:
- apt-get update
- apt-get install --no-install-recommends -y curl ca-certificates
- curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh | bash
- curl -s https://raw.githubusercontent.com/bash-unit/bash_unit/master/install.sh | bash
- FORCE_COLOR=true ./bash_unit tests/test_*
```

Expand All @@ -159,7 +159,7 @@ Add the following to your pre-commit configuration. By default it will run scrip
[.pre-commit-config,yaml]
```
repos:
- repo: https://github.com/pgrange/bash_unit
- repo: https://github.com/bash-unit/bash_unit
rev: v2.2.0
hooks:
- id: bash-unit
Expand Down Expand Up @@ -336,7 +336,7 @@ If you write code outside of any bash function, this code will be executed once
your file is a bash script and *bash_unit* sources it before running your tests. It is suggested to write a
*setup_suite* function and avoid any code outside a bash function. you must not use any bash_unit assertion
in setup_suite or use exit in setup_suite for teardown_suite to be run.
See https://github.com/pgrange/bash_unit/issues/43[issue 43] for more details.
See https://github.com/bash-unit/bash_unit/issues/43[issue 43] for more details.

If you want to keep an eye on a test not yet implemented, prefix the name of the function by *todo* instead of test.
Test to do are not executed and do not impact the global status of your test suite but are displayed in *bash_unit* output.
Expand Down
4 changes: 2 additions & 2 deletions bash_unit
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# https://github.com/pgrange/bash_unit
# https://github.com/bash-unit/bash_unit

# shellcheck disable=2317 # Ignore unreachable - most function are not called.
# shellcheck disable=2155 # Ignore Declare and assign separately
Expand Down Expand Up @@ -305,7 +305,7 @@ usage() {
echo "<output format> is optional only supported value is tap" >&2
echo "-r to execute test cases in random order" >&2
echo "-v to get current version information" >&2
echo "See https://github.com/pgrange/bash_unit" >&2
echo "See https://github.com/bash-unit/bash_unit" >&2
exit 1
}

Expand Down
8 changes: 4 additions & 4 deletions docs/man/man1/bash_unit.1
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ jobs:
\- uses: actions/checkout@v4
\- name: Unit testing with bash_unit
run: |
curl \-s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh | bash
curl \-s https://raw.githubusercontent.com/bash-unit/bash_unit/master/install.sh | bash
FORCE_COLOR=true ./bash_unit tests/test_*
.fam
.fi
Expand All @@ -262,7 +262,7 @@ test:
script:
\- apt\-get update
\- apt\-get install \-\-no\-install\-recommends \-y curl ca\-certificates
\- curl \-s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh | bash
\- curl \-s https://raw.githubusercontent.com/bash-unit/bash_unit/master/install.sh | bash
\- FORCE_COLOR=true ./bash_unit tests/test_*
.fam
.fi
Expand All @@ -283,7 +283,7 @@ Add the following to your pre\-commit configuration. By default it will run scri
.nf
.fam C
repos:
\- repo: https://github.com/pgrange/bash_unit
\- repo: https://github.com/bash-unit/bash_unit
rev: v2.2.0
hooks:
\- id: bash\-unit
Expand Down Expand Up @@ -495,7 +495,7 @@ your file is a bash script and \fBbash_unit\fP sources it before running your te
\fBsetup_suite\fP function and avoid any code outside a bash function. you must not use any bash_unit assertion
in setup_suite or use exit in setup_suite for teardown_suite to be run.
See \c
.URL "https://github.com/pgrange/bash_unit/issues/43" "issue 43" ""
.URL "https://github.com/bash-unit/bash_unit/issues/43" "issue 43" ""
for more details.
.sp
If you want to keep an eye on a test not yet implemented, prefix the name of the function by \fBtodo\fP instead of test.
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CURL="curl --show-error --silent --location"

echo "downloading bash_unit"
current_working_dir=$PWD
tarball_urls=$($CURL https://api.github.com/repos/pgrange/bash_unit/releases | grep tarball_url)
tarball_urls=$($CURL https://api.github.com/repos/bash-unit/bash_unit/releases | grep tarball_url)
tarball_url=$(echo "$tarball_urls" | head -n 1 | cut -d '"' -f 4)
tmp_dir=$(mktemp -d 2>/dev/null || mktemp -d -t 'tmpdir')
cd "$tmp_dir" || exit
Expand Down
2 changes: 1 addition & 1 deletion release
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ publish_release() {

git push
git push --tags
curl -u "$user:$token" -XPOST https://api.github.com/repos/pgrange/bash_unit/releases -d "
curl -u "$user:$token" -XPOST https://api.github.com/repos/bash-unit/bash_unit/releases -d "
{
\"tag_name\": \"$version\"
}"
Expand Down
10 changes: 5 additions & 5 deletions tests/test_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ test_display_usage_when_test_file_does_not_exist() {
}

test_bash_unit_succeed_when_no_failure_even_if_no_teardown() {
#FIX https://github.com/pgrange/bash_unit/issues/8
#FIX https://github.com/bash-unit/bash_unit/issues/8
assert "$BASH_UNIT <(echo 'test_success() { echo -n ; }')"
}

test_bash_unit_runs_teardown_even_in_case_of_failure() {
#FIX https://github.com/pgrange/bash_unit/issues/10
#FIX https://github.com/bash-unit/bash_unit/issues/10
assert_equals "ran teardown" \
"$($BASH_UNIT <(echo 'test_fail() { fail ; } ; teardown() { echo "ran teardown" >&2 ; }') 2>&1 >/dev/null)"
}
Expand All @@ -160,19 +160,19 @@ test_bash_unit_runs_teardown_suite_even_in_case_of_failure() {
}

test_bash_unit_runs_teardown_suite_even_in_case_of_failure_setup_suite() {
#FIX https://github.com/pgrange/bash_unit/issues/43
#FIX https://github.com/bash-unit/bash_unit/issues/43
assert_equals "ran teardown_suite" \
"$($BASH_UNIT <(echo 'setup_suite() { return 1 ; } ; teardown_suite() { echo "ran teardown_suite" >&2 ; }') 2>&1 >/dev/null)"
}

test_one_test_should_stop_after_first_assertion_failure() {
#FIX https://github.com/pgrange/bash_unit/issues/10
#FIX https://github.com/bash-unit/bash_unit/issues/10
assert_equals "before failure" \
"$($BASH_UNIT <(echo 'test_fail() { echo "before failure" >&2 ; fail ; echo "after failure" >&2 ; }') 2>&1 >/dev/null)"
}

test_one_test_should_stop_when_assert_fails() {
#FIX https://github.com/pgrange/bash_unit/issues/26
#FIX https://github.com/bash-unit/bash_unit/issues/26
assert_equals "before failure" \
"$($BASH_UNIT <(echo 'test_fail() { echo "before failure" >&2 ; assert false ; echo "after failure" >&2 ; }') 2>&1 >/dev/null)"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ EOF
}

test_should_pretty_format_even_when_LANG_is_unset() {
# See https://github.com/pgrange/bash_unit/pull/81
# See https://github.com/bash-unit/bash_unit/pull/81
unset LANG
assert "echo foo | pretty_format GREEN I"
}
Expand Down