From 52ca7795feb001f0624ec87e717e3019f8a810bd Mon Sep 17 00:00:00 2001 From: Juhani Rankimies Date: Sun, 5 Dec 2010 02:07:12 +0200 Subject: 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. --- test/rebar_file_utils_tests.erl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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 %% ==================================================================== -- cgit v1.1