Skip to content

Commit

Permalink
[fix] tools/oshc-deps.sh uses osh --tool
Browse files Browse the repository at this point in the history
Should rename the file itself too
  • Loading branch information
Andy C committed Jul 29, 2023
1 parent 72ec6f6 commit 3b40685
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion devtools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ readonly HAVE_ROOT=1
readonly -a MORE_TESTS=(
process-table
gold
ysh-prettify
ysh-ify
parse-errors runtime-errors
ysh-runtime-errors
ysh-parse-errors
Expand Down
2 changes: 1 addition & 1 deletion doc/release-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ This is a supplement to the [main release page](index.html).
- How many processes does Oils start compared to other shells?
- [syscall/by-code](more-tests.wwz/syscall/by-code.txt)
| [syscall/by-input](more-tests.wwz/syscall/by-input.txt)
- [ysh-prettify Tests](more-tests.wwz/suite-logs/ysh-prettify.txt). Test OSH to YSH
- [ysh-ify Tests](more-tests.wwz/suite-logs/ysh-ify.txt). Test OSH to YSH
translation.

[Smoosh]: http://shell.cs.pomona.edu/
Expand Down
32 changes: 2 additions & 30 deletions test/oshc-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,12 @@ source test/common.sh

# Compare osh code on stdin (fd 0) and expected oil code on fd 3.
assert-deps() {
bin/oshc deps | diff -u /dev/fd/3 - || fail
}

test-usage() {
set +o errexit

# missing required subcommand
bin/oshc
test $? -eq 2 || fail

bin/oshc invalid
test $? -eq 2 || fail

# Syntax error
echo '<' | bin/oshc deps
test $? -eq 2 || fail

# File not found
bin/oshc deps nonexistent.txt
test $? -eq 2 || fail

return

# Doesn't work yet
echo --
bin/oshc --help
test $? -eq 0 || fail

set -o errexit
bin/osh --tool deps | diff -u /dev/fd/3 - || fail
}

test-ourselves() {
### This shows an errror but doesn't exit 0
bin/oshc deps $0
bin/osh --tool deps $0
test $? -eq 0 || fail
}

Expand Down

0 comments on commit 3b40685

Please sign in to comment.