diff options
author | Bryan Drewery <bryan@shatow.net> | 2018-02-13 06:20:57 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2018-02-13 06:20:58 +0300 |
commit | f70aa9dcd4562914483a9f5cc773a6c1fd983088 (patch) | |
tree | 48bd81f6c9489bc2a81ab8d7d7cb00eab28f5681 /test | |
parent | a246f799ed8cb12435d5052ba46212150633699a (diff) |
read_file: Cleanup a few things.
1. Use $'\n'
2. Return earlier if no file
3. Use _line to avoid truncating parent scope
Diffstat (limited to 'test')
-rw-r--r-- | test/read_file.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/read_file.sh b/test/read_file.sh index 19def1ae..5b584c28 100644 --- a/test/read_file.sh +++ b/test/read_file.sh @@ -5,7 +5,7 @@ TMP=$(mktemp -u) data=blah -read_file data "${TMP}" 2>/dev/null +read_file data "${TMP}" assert_not 0 $? "read_file on missing file should not return 0" assert '' "${data}" "read_file on missing file should be blank" assert 0 "${_read_file_lines_read}" "_read_file_lines_read should be 0 on missing file" |