WOW. I finish read the doc about #:final
That is so beatiful thing. Thank you to you three
Em dom, 17 de fev de 2019 às 22:18, Joao Pedro Abreu De Souza <
jp_ab...@id.uff.br> escreveu:
> Thanks for the feedback!
> I will study this code and make more functional
>
> Em dom, 17 de fev de 2019
Thanks for the feedback!
I will study this code and make more functional
Em dom, 17 de fev de 2019 22:13, Philip McGrath Well, if you call `(exit 0)`, your Racket program really will exit with
> code 0 without doing anything else: the function `exit` never returns, so,
> in your case, `execute`
Well, if you call `(exit 0)`, your Racket program really will exit with
code 0 without doing anything else: the function `exit` never returns, so,
in your case, `execute` never returns, `refine-main` never returns, and
Rackunit never gets a chance to look at any output it may or may not have
Thanks a lot.
Sorry about the simple error.
Em dom, 17 de fev de 2019 22:06, Matthias Felleisen
>
> On Feb 17, 2019, at 6:44 PM, Joao Pedro Abreu De Souza
> wrote:
>
> (check-equal?
> (with-output-to-string
>(lambda ()
> (with-input-from-string "input"
>(lambda ()
>
> On Feb 17, 2019, at 6:44 PM, Joao Pedro Abreu De Souza
> wrote:
>
> (check-equal?
> (with-output-to-string
>(lambda ()
> (with-input-from-string "input"
>(lambda ()
> (refine-main)
Your mistake is in the above line. You want to write refine-main not
(define (refine-main)
(display next-string) ;;feito
(set! next-command (shell-parser (my-read-line))) ;;TODO my-read-line
(execute next-command) ;;TODO execute
(refine-main)) ;;feito
This is refine-main
"shell-parser" is just a PEG-based parser, that return a
Well, there's no imediate return, i need to type exit 0 to finally the test
works
I am using read-line to read input. Today later I will post more code(of
refine-main).
Thanks
Em dom, 17 de fev de 2019 10:37, Greg Hendershott What does it do? Does `check-equal?` show a failure message? If so,
What does it do? Does `check-equal?` show a failure message? If so,
what does it say?
I don't know what `refine-main` does, but this simple version works for me:
#lang racket
(require rackunit)
(define (refine-main)
(display (read-line))) ;echo
(check-equal?
(with-output-to-string
Hi everyone. I have a test of a user-related function that I don't can see
why don't work :
#lang racket
(require rackunit)
(require "../../main.rkt")
(check-equal?
(with-output-to-string (lambda ()
(with-input-from-string
9 matches
Mail list logo