Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from rkoeninger/master
Browse files Browse the repository at this point in the history
Added ability to pass *.shen files on command line
  • Loading branch information
rkoeninger authored Apr 28, 2017
2 parents c6981f1 + a84d2a9 commit 2fb11ff
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ addons:
- sbcl
script:
- ./build.sh
- ./shen testsuite.shen
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## Unreleased

### Added
- Ability to provide `*.shen` files on the command line; REPL does not start if any provided.
- `testsuite.shen`, which runs the standard test suite.

## 1.2

### Added
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ Fetch the kernel sources by running `./fetch.sh`/`fetch.bat`. This will download

Build by running `build.sh`/`build.bat`. This will generate the `shen`/`shen.exe` executable. If the `kernel` folder is not present, `fetch` will be called first.

Start the shen repl by running the executable.
Start the Shen REPL by running the executable.

Shen files can be specified on the command line, in which case they will be run sequentially and the REPL will not be started by default. The REPL can still be started by invoking `(shen.shen)`.

The test suite can be run by running `./shen testsuite.shen`/`shen.exe testsuite.shen`.
13 changes: 9 additions & 4 deletions primitives.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
(SETQ *sterror* *ERROR-OUTPUT*)

(DEFUN SHEN-TOPLEVEL ()
(HANDLER-CASE (shen.shen)
(SB-SYS:INTERACTIVE-INTERRUPT ()
(FORMAT T "~%Quit.~%")
(exit 0))))
(LET ((Args (CDR SB-EXT:*POSIX-ARGV*)))
(IF (CONSP Args)
(PROGN
(MAPC 'load Args)
(exit 0))
(HANDLER-CASE (shen.shen)
(SB-SYS:INTERACTIVE-INTERRUPT ()
(FORMAT T "~%Quit.~%")
(exit 0))))))
3 changes: 3 additions & 0 deletions testsuite.shen
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(cd "kernel/tests")
(load "README.shen")
(load "tests.shen")

0 comments on commit 2fb11ff

Please sign in to comment.