! Copyright (C) 2015 John Benediktsson
! See https://factorcode.org/license.txt for BSD license
-USING: fry io io.encodings.utf8 interpolate io.launcher
-multiline sequences ;
+USING: interpolate io.launcher multiline sequences ;
IN: backticks
SYNTAX: `
"`" parse-multiline-string '[
- _ interpolate>string
- utf8 [ read-contents ] with-process-reader
+ _ interpolate>string process-contents
] append! ;
! Copyright (C) 2015 Doug Coleman.
! See https://factorcode.org/license.txt for BSD license.
-USING: accessors fry git io io.directories io.encodings.utf8
-io.launcher io.streams.string kernel sequences tools.test ;
+USING: accessors git io io.directories io.launcher
+io.streams.string kernel sequences tools.test ;
IN: git.tests
-: run-process-stdout ( process -- string )
- >process utf8 [ read-contents ] with-process-reader ;
-
: with-empty-test-git-repo ( quot -- )
'[
{ "git" "init" } run-process drop
{ } [
[
- { "git" "log" } run-process-stdout print
+ { "git" "log" } process-contents print
] with-zero-byte-file-repo
] unit-test
DEFER: expansion
M: back-quoted-expr expand
- expr>> expr command>> expansion
- utf8 [ read-contents ] with-process-reader
+ expr>> expr command>> expansion process-contents
" \n" split harvest ;
: expansion ( command -- command ) [ expand ] map flatten ;
: check-new-factor ( path branch/checksum cmd -- out )
nip [ factor-path "-i=factor.image" ] dip "-e=%s" sprintf 3array
"./test-bisect-log" zealot-test-command
- '[ _ utf8 [ read-contents ] with-process-reader ] with-directory ;
+ '[ _ process-contents ] with-directory ;
: build-new-factor ( branch/checksum -- )
checkout-new-factor bootstrap-new-factor test-new-factor ;