summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJuhani Rankimies <juhani@juranki.com>2010-12-05 02:07:12 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-01-06 15:02:19 +0100
commit52ca7795feb001f0624ec87e717e3019f8a810bd (patch)
treee66560012ae9789dfaa9d1822d19deff4676f679 /test
parentf7eb0a71589ec4ebee1315fe2f430d8af607aa36 (diff)
Unify executable invocation
Add flags to rebar_utils:sh to control output and error handling. Replace calls to os:cmd with calls to rebar_utils:sh.
Diffstat (limited to 'test')
-rw-r--r--test/rebar_file_utils_tests.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rebar_file_utils_tests.erl b/test/rebar_file_utils_tests.erl
index 6b87986..fd9a141 100644
--- a/test/rebar_file_utils_tests.erl
+++ b/test/rebar_file_utils_tests.erl
@@ -215,6 +215,18 @@ cp_r_overwrite_dir_fail_test_() ->
[filename:join([?TMP_DIR,"source"])],
filename:join([?TMP_DIR,"dest"])))]}.
+mv_file_test_() ->
+ {"move a file to folder",
+ setup,
+ fun() ->
+ setup(),
+ rebar_file_utils:mv(filename:join([?TMP_DIR,"source","file1"]),
+ filename:join([?TMP_DIR,"dest"]))
+ end,
+ fun teardown/1,
+ [?_assert(filelib:is_file(filename:join([?TMP_DIR,"dest","file1"]))),
+ ?_assertNot(filelib:is_file(filename:join([?TMP_DIR,"source","file1"])))]}.
+
%% ====================================================================
%% Utilities
%% ====================================================================