Improved README file
This commit is contained in:
parent
92adcde5d4
commit
7b3b27cf0f
35
README.md
35
README.md
|
@ -1,4 +1,37 @@
|
||||||
REPLtest
|
REPLtest
|
||||||
========
|
========
|
||||||
|
|
||||||
This package provides the `#lang repltest` meta-language, which can be used to turn the transcript of an interactive racket session into a series of tests.
|
This package provides the `#lang repltest` meta-language, which can be used to turn the transcript of an interactive racket session into a series of tests.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
```
|
||||||
|
raco pkg install repltest
|
||||||
|
```
|
||||||
|
|
||||||
|
Then write a file using the repltest meta-language, containing definitions at the top and interactions after the first prompt (by default the prompt is `"> "`, I will add customization options later).
|
||||||
|
|
||||||
|
```
|
||||||
|
#lang debug repltest typed/racket
|
||||||
|
;; There is a problem if there is a comment before a prompt, as comments aren't
|
||||||
|
;; gobbled-up by the preceeding read.
|
||||||
|
(define x 0)
|
||||||
|
(define y 1)
|
||||||
|
'displayed
|
||||||
|
(displayln "displayed too")
|
||||||
|
|
||||||
|
> (+ 1 1)
|
||||||
|
- : Integer [more precisely: Positive-Index]
|
||||||
|
2
|
||||||
|
> x
|
||||||
|
- : Integer [more precisely: Zero]
|
||||||
|
0
|
||||||
|
> (values x y)
|
||||||
|
- : (values Integer Integer) [more precisely: (Values Zero One)]
|
||||||
|
0
|
||||||
|
1
|
||||||
|
> #R(+ 2 0)
|
||||||
|
(+ 2 0) = 2
|
||||||
|
- : Integer [more precisely: Positive-Byte]
|
||||||
|
2
|
||||||
|
```
|
12
main.rkt
12
main.rkt
|
@ -1,7 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(module+ test
|
;; This package is a meta-language, and currently provides no bindings.
|
||||||
(require rackunit))
|
|
||||||
|
|
||||||
;; Notice
|
;; Notice
|
||||||
;; To install (from within the package directory):
|
;; To install (from within the package directory):
|
||||||
|
@ -24,12 +23,3 @@
|
||||||
;; See the current version of the racket style guide here:
|
;; See the current version of the racket style guide here:
|
||||||
;; http://docs.racket-lang.org/style/index.html
|
;; http://docs.racket-lang.org/style/index.html
|
||||||
|
|
||||||
;; Code here
|
|
||||||
|
|
||||||
(module+ test
|
|
||||||
;; Tests to be run with raco test
|
|
||||||
)
|
|
||||||
|
|
||||||
(module+ main
|
|
||||||
;; Main entry point, executed when run with the `racket` executable or DrRacket.
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user