Skip to content

Commit

Permalink
test doc: test_write_lines does not split its arguments
Browse files Browse the repository at this point in the history
test_write_lines carefully quotes its arguments as "$@", so

	test_write_lines "a b" c

writes two lines as requested, not three.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Jun 10, 2014
1 parent ac9afcc commit bb98b01
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions t/README
Original file line number Diff line number Diff line change
Expand Up @@ -596,15 +596,14 @@ library for your script to use.
...
'

- test_write_lines <text>
- test_write_lines <lines>

Split <text> to white-space separated words and write it out on standard
output, one word per line.
Write <lines> on standard output, one line per argument.
Useful to prepare multi-line files in a compact form.

Example:

test_write_lines "a b c d e f g" >foo
test_write_lines a b c d e f g >foo

Is a more compact equivalent of:
cat >foo <<-EOF
Expand Down

0 comments on commit bb98b01

Please sign in to comment.