diff --git a/pitfall/ptest/info.rkt b/pitfall/ptest/info.rkt new file mode 100644 index 00000000..16f0cae0 --- /dev/null +++ b/pitfall/ptest/info.rkt @@ -0,0 +1,4 @@ +#lang info +(define compile-omit-paths 'all) +(define test-omit-paths 'all) +(define raco-commands '(("ptest" ptest/raco "ptests" #f))) \ No newline at end of file diff --git a/pitfall/ptest/log.rkt b/pitfall/ptest/log.rkt new file mode 100644 index 00000000..6f9dfd65 --- /dev/null +++ b/pitfall/ptest/log.rkt @@ -0,0 +1,4 @@ +#lang racket/base +(require racket/logging) +(provide (all-defined-out)) +(define-logger ptest) \ No newline at end of file diff --git a/pitfall/ptest/raco.rkt b/pitfall/ptest/raco.rkt new file mode 100644 index 00000000..0ef0a707 --- /dev/null +++ b/pitfall/ptest/raco.rkt @@ -0,0 +1,15 @@ +#lang debug racket/base +(require racket/logging + racket/match + "log.rkt") + +(with-logging-to-port + (current-error-port) + (λ () + (match (with-handlers ([exn:fail? (λ (exn) #f)]) + (vector-ref (current-command-line-arguments) 0)) + ["test" (dynamic-require 'ptest/all #f)] + [_ (displayln "no cmd given")])) + #:logger ptest-logger + 'info + 'ptest) \ No newline at end of file