Revert "Added a /dev/null-like output port to unstable."
open-output-nowhere already does something similar.
This commit is contained in:
parent
9c12b7d2e7
commit
6e16a76b51
|
@ -1802,7 +1802,6 @@ path/s is either such a string or a list of them.
|
||||||
"collects/tests/units/test-unit.rktl" drdr:command-line (racket "-f" *)
|
"collects/tests/units/test-unit.rktl" drdr:command-line (racket "-f" *)
|
||||||
"collects/tests/unstable/byte-counting-port.rkt" responsible (jay)
|
"collects/tests/unstable/byte-counting-port.rkt" responsible (jay)
|
||||||
"collects/tests/unstable/generics.rkt" responsible (jay)
|
"collects/tests/unstable/generics.rkt" responsible (jay)
|
||||||
"collects/tests/unstable/port.rkt" responsible (stamourv)
|
|
||||||
"collects/tests/unstable/srcloc.rktl" responsible (cce) drdr:command-line (racket "-f" *)
|
"collects/tests/unstable/srcloc.rktl" responsible (cce) drdr:command-line (racket "-f" *)
|
||||||
"collects/tests/utils" responsible (unknown)
|
"collects/tests/utils" responsible (unknown)
|
||||||
"collects/tests/utils/gui.rkt" drdr:command-line (gracket-text "-t" *)
|
"collects/tests/utils/gui.rkt" drdr:command-line (gracket-text "-t" *)
|
||||||
|
@ -1849,14 +1848,12 @@ path/s is either such a string or a list of them.
|
||||||
"collects/unstable/match.rkt" responsible (samth)
|
"collects/unstable/match.rkt" responsible (samth)
|
||||||
"collects/unstable/mutated-vars.rkt" responsible (samth)
|
"collects/unstable/mutated-vars.rkt" responsible (samth)
|
||||||
"collects/unstable/poly-c.rkt" responsible (samth)
|
"collects/unstable/poly-c.rkt" responsible (samth)
|
||||||
"collects/unstable/port.rkt" responsible (stamourv)
|
|
||||||
"collects/unstable/scribblings/byte-counting-port.scrbl" responsible (jay)
|
"collects/unstable/scribblings/byte-counting-port.scrbl" responsible (jay)
|
||||||
"collects/unstable/scribblings/debug.scrbl" responsible (samth)
|
"collects/unstable/scribblings/debug.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/hash.scrbl" responsible (samth)
|
"collects/unstable/scribblings/hash.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/match.scrbl" responsible (samth)
|
"collects/unstable/scribblings/match.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/mutated-vars.scrbl" responsible (samth)
|
"collects/unstable/scribblings/mutated-vars.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/poly-c.scrbl" responsible (samth)
|
"collects/unstable/scribblings/poly-c.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/port.scrbl" responsible (stamourv)
|
|
||||||
"collects/unstable/scribblings/sequence.scrbl" responsible (samth)
|
"collects/unstable/scribblings/sequence.scrbl" responsible (samth)
|
||||||
"collects/unstable/scribblings/utils.rkt" responsible (samth)
|
"collects/unstable/scribblings/utils.rkt" responsible (samth)
|
||||||
"collects/unstable/sequence.rkt" responsible (samth)
|
"collects/unstable/sequence.rkt" responsible (samth)
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#lang racket
|
|
||||||
|
|
||||||
(require unstable/port
|
|
||||||
test-engine/scheme-tests)
|
|
||||||
|
|
||||||
(check-expect (port? null-output-port)
|
|
||||||
#t)
|
|
||||||
|
|
||||||
(check-expect (with-output-to-string
|
|
||||||
(lambda ()
|
|
||||||
(parameterize ([current-output-port null-output-port])
|
|
||||||
(display "can't see me"))))
|
|
||||||
"")
|
|
||||||
|
|
||||||
(check-expect (with-output-to-string
|
|
||||||
(lambda ()
|
|
||||||
(display "now you see me")
|
|
||||||
(parameterize ([current-output-port null-output-port])
|
|
||||||
(display "now you don't"))
|
|
||||||
(display "you can see me again")))
|
|
||||||
"now you see meyou can see me again")
|
|
||||||
|
|
||||||
(test)
|
|
|
@ -1,18 +0,0 @@
|
||||||
#lang racket/base
|
|
||||||
|
|
||||||
(provide null-output-port)
|
|
||||||
|
|
||||||
;; taken from section 12.1.9 of the reference
|
|
||||||
;; -- stamourv
|
|
||||||
(define null-output-port
|
|
||||||
(make-output-port
|
|
||||||
'null
|
|
||||||
always-evt
|
|
||||||
(lambda (s start end non-block? breakable?) (- end start))
|
|
||||||
void
|
|
||||||
(lambda (special non-block? breakable?) #t)
|
|
||||||
(lambda (s start end) (wrap-evt
|
|
||||||
always-evt
|
|
||||||
(lambda (x)
|
|
||||||
(- end start))))
|
|
||||||
(lambda (special) always-evt)))
|
|
|
@ -1,16 +0,0 @@
|
||||||
#lang scribble/doc
|
|
||||||
@(require scribble/base
|
|
||||||
scribble/manual
|
|
||||||
"utils.rkt"
|
|
||||||
(for-label unstable/port
|
|
||||||
racket/base))
|
|
||||||
|
|
||||||
@title[#:tag "port"]{Port}
|
|
||||||
|
|
||||||
@defmodule[unstable/port]
|
|
||||||
|
|
||||||
@unstable[@author+email["Vincent St-Amour" "stamourv@ccs.neu.edu"]]
|
|
||||||
|
|
||||||
@defthing[null-output-port output-port?]{
|
|
||||||
Output port that discards everything written to it.
|
|
||||||
}
|
|
|
@ -90,7 +90,6 @@ Keep documentation and tests up to date.
|
||||||
@include-section["sequence.scrbl"]
|
@include-section["sequence.scrbl"]
|
||||||
@include-section["hash.scrbl"]
|
@include-section["hash.scrbl"]
|
||||||
@include-section["match.scrbl"]
|
@include-section["match.scrbl"]
|
||||||
@include-section["port.scrbl"]
|
|
||||||
@include-section["skip-list.scrbl"]
|
@include-section["skip-list.scrbl"]
|
||||||
@include-section["interval-map.scrbl"]
|
@include-section["interval-map.scrbl"]
|
||||||
@include-section["generics.scrbl"]
|
@include-section["generics.scrbl"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user