Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@offby1 authored
Showing with 1 addition and 30 deletions.
  1. +1 −1  crude-test-runner.sh
  2. +0 −29 iserver.rkt
View
2  crude-test-runner.sh
@@ -2,7 +2,7 @@
# Sure be nice if there were a built-in way to run all the tests ...
-(echo incubot.rkt; echo iserver.rkt ; egrep -l '(scheme|rack)unit' *.rkt) | while read f
+(echo incubot.rkt; egrep -l '(scheme|rack)unit' *.rkt) | while read f
do
if [ -x $f ]
then
View
29 iserver.rkt 100755 → 100644
@@ -1,9 +1,3 @@
-#! /bin/sh
-#| Hey Emacs, this is -*-scheme-*- code!
-#$Id$
-exec racket -l errortrace --require "$0" --main -- ${1+"$@"}
-|#
-
#lang racket
(require
@@ -72,26 +66,3 @@ exec racket -l errortrace --require "$0" --main -- ${1+"$@"}
(lambda (command-sym inp)
(channel-put *to-server* (cons command-sym inp))
(channel-get *from-server*)))]))
-
-(provide main)
-(define (main . args)
- (parameterize
- ([*incubot-logger* (curry fprintf (current-error-port))])
- (let ([s (make-incubot-server
- (open-input-string
- (string-append
- "#s(utterance \"2010-01-19T03:01:31Z\" \"offby1\" \"##cinema\" \"Let's make hamsters race\")"
- "\n"
- "#s(utterance \"2010-01-19T03:01:31Z\" \"offby1\" \"##cinema\" \"Gimme some dough\")")
- ))])
- (define (get input) (s 'get input))
- (define (put sentence) (s 'put sentence))
-
- (define (try input) (printf "~a => ~s~%" input (time (get input))))
-
- (try "Oh shit")
- (try "Oops, ate too much cookie dough")
- (try "OOPS, ATE TOO MUCH COOKIE DOUGH")
- (put "What is all this shit?")
- (try "hamsters")
- (try "Oh shit"))))
Please sign in to comment.
Something went wrong with that request. Please try again.