Skip to content
This repository
Browse code

Nix iserver tests, since I can't figure out how to get them to work.

OK, obviously I need to preare a "test" incubot server, with a corpus
that the test itself preloads.  But I'm too lazy to do that.
  • Loading branch information...
commit 6e2aaab43a57c98b5c6649dc16b211b3f39e626e 1 parent 963e648
Eric Hanchrow authored

Showing 2 changed files with 1 addition and 30 deletions. Show diff stats Hide diff stats

  1. +1 1  crude-test-runner.sh
  2. +0 29 iserver.rkt
2  crude-test-runner.sh
@@ -2,7 +2,7 @@
2 2
3 3 # Sure be nice if there were a built-in way to run all the tests ...
4 4
5   -(echo incubot.rkt; echo iserver.rkt ; egrep -l '(scheme|rack)unit' *.rkt) | while read f
  5 +(echo incubot.rkt; egrep -l '(scheme|rack)unit' *.rkt) | while read f
6 6 do
7 7 if [ -x $f ]
8 8 then
29 iserver.rkt 100755 → 100644
... ... @@ -1,9 +1,3 @@
1   -#! /bin/sh
2   -#| Hey Emacs, this is -*-scheme-*- code!
3   -#$Id$
4   -exec racket -l errortrace --require "$0" --main -- ${1+"$@"}
5   -|#
6   -
7 1 #lang racket
8 2
9 3 (require
@@ -72,26 +66,3 @@ exec racket -l errortrace --require "$0" --main -- ${1+"$@"}
72 66 (lambda (command-sym inp)
73 67 (channel-put *to-server* (cons command-sym inp))
74 68 (channel-get *from-server*)))]))
75   -
76   -(provide main)
77   -(define (main . args)
78   - (parameterize
79   - ([*incubot-logger* (curry fprintf (current-error-port))])
80   - (let ([s (make-incubot-server
81   - (open-input-string
82   - (string-append
83   - "#s(utterance \"2010-01-19T03:01:31Z\" \"offby1\" \"##cinema\" \"Let's make hamsters race\")"
84   - "\n"
85   - "#s(utterance \"2010-01-19T03:01:31Z\" \"offby1\" \"##cinema\" \"Gimme some dough\")")
86   - ))])
87   - (define (get input) (s 'get input))
88   - (define (put sentence) (s 'put sentence))
89   -
90   - (define (try input) (printf "~a => ~s~%" input (time (get input))))
91   -
92   - (try "Oh shit")
93   - (try "Oops, ate too much cookie dough")
94   - (try "OOPS, ATE TOO MUCH COOKIE DOUGH")
95   - (put "What is all this shit?")
96   - (try "hamsters")
97   - (try "Oh shit"))))

0 comments on commit 6e2aaab

Please sign in to comment.
Something went wrong with that request. Please try again.