From 505f52a8ff8c16c742314d55a17e0eafe7e37716 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Wed, 25 Jan 2012 23:22:52 +0800 Subject: [PATCH] Removed Unnecessary Usage of Cat --- test/lib/git/repo_index_test.sh | 2 +- test/lib/git/status_shortcuts_test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/git/repo_index_test.sh b/test/lib/git/repo_index_test.sh index 4012e04..46100e1 100755 --- a/test/lib/git/repo_index_test.sh +++ b/test/lib/git/repo_index_test.sh @@ -82,7 +82,7 @@ ensureIndex() { } index_no_newlines() { - cat $git_index_file | tr "\\n" " " + tr "\\n" " " < $git_index_file } diff --git a/test/lib/git/status_shortcuts_test.sh b/test/lib/git/status_shortcuts_test.sh index b79ea8c..7765d5e 100755 --- a/test/lib/git/status_shortcuts_test.sh +++ b/test/lib/git/status_shortcuts_test.sh @@ -97,7 +97,7 @@ test_git_status_shortcuts() { # Run command in shell, load output from temp file into variable temp_file=$(mktemp -t scm_breeze.XXXXXXXXXX) git_status_shortcuts > $temp_file - git_status=$(cat $temp_file | strip_colors) + git_status=$(<$temp_file strip_colors) assertIncludes "$git_status" "new file: *\[1\] *new_file" || return assertIncludes "$git_status" "deleted: *\[2\] *deleted_file" || return