Skip to content

Commit

Permalink
local empty folder returns status remote_only
Browse files Browse the repository at this point in the history
a unit test to trigger this effect.

re #7031
  • Loading branch information
gesnerpassos committed May 28, 2013
1 parent a6ed4ab commit c6d829d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,20 @@ class ScriptRepositoryTestImpl : public CxxTest::TestSuite{
TS_ASSERT(repo->fileStatus(folder_name) == Mantid::API::BOTH_UNCHANGED) ;
}

void test_status_of_empty_local_folder(){
std::string folder_name = "LocalFolder";
// install
TS_ASSERT_THROWS_NOTHING(repo->install(local_rep));

Poco::File dir(std::string(local_rep).append(folder_name));
dir.createDirectories();

// list files
TS_ASSERT_THROWS_NOTHING(repo->listFiles());
// it should be local only
TS_ASSERT(repo->fileStatus(folder_name) == Mantid::API::LOCAL_ONLY) ;
}

void test_downloading_and_removing_files(){
std::string file_name = "TofConv/TofConverter.py";
// install
Expand Down

0 comments on commit c6d829d

Please sign in to comment.