[gitg] Add utility function to test for file existence



commit 32c0db75dc2cc6ddf1b641de1415f72a89d787e6
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Thu Aug 13 20:18:32 2015 +0200

    Add utility function to test for file existence

 tests/support/repository.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/support/repository.vala b/tests/support/repository.vala
index d20c1c5..3271cec 100644
--- a/tests/support/repository.vala
+++ b/tests/support/repository.vala
@@ -73,6 +73,11 @@ class Gitg.Test.Repository : Gitg.Test.Test
                Assert.assert_file_contents(Path.build_filename(wd.get_path(), filename), expected_contents);
        }
 
+       public bool file_exists(string filename)
+       {
+               return d_repository.get_workdir().get_child(filename).query_exists();
+       }
+
        private void write_files(File[] files)
        {
                var wd = d_repository.get_workdir();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]