Skip to content

Instantly share code, notes, and snippets.

@snmsts
Created May 19, 2012 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snmsts/2730735 to your computer and use it in GitHub Desktop.
Save snmsts/2730735 to your computer and use it in GitHub Desktop.
古いhunchentootによる単純なpostのテスト。
#!/usr/local/bin/sbcl --script
(print (parse-integer(second *posix-argv*)))
(load #P"/tmp/http.test/quicklisp/setup.lisp")
(ql:quickload '(:hunchentoot :trivial-shell))
(hunchentoot:start
(make-instance 'hunchentoot:acceptor
:port (parse-integer(second *posix-argv*))))
(defvar *tmp* nil)
(hunchentoot:define-easy-handler (test :uri "/test")
(x y)
(setf *tmp* (list :x x :y y))
(print *tmp*)
(force-output *standard-output*)
"hoge")
(loop :while t :do
(trivial-shell:shell-command (format nil "curl -F x=@/tmp/http.test/quicklisp.lisp -F y=1 http://localhost:~A/test" (second *posix-argv*)))
(sleep 10))
#!/bin/sh
rm -rf /tmp/http.test/
mkdir /tmp/http.test/
curl http://beta.quicklisp.org/quicklisp.lisp >/tmp/http.test/quicklisp.lisp
sbcl --non-interactive --no-sysinit --no-userinit --load /tmp/http.test/quicklisp.lisp --eval "(ignore-errors (quicklisp-quickstart:install :path \"/tmp/http.test/quicklisp/\"))"
sbcl --non-interactive --no-sysinit --no-userinit --load /tmp/http.test/quicklisp/setup.lisp --eval "(ql-dist:install-dist \"http://beta.quicklisp.org/dist/quicklisp/2011-10-01/distinfo.txt\" :replace t :prompt nil)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment