diff options
Diffstat (limited to 'tests/test_basic.py')
-rw-r--r-- | tests/test_basic.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/test_basic.py b/tests/test_basic.py index 07646af..41d1c0e 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -266,7 +266,6 @@ class DotfilesTestCase(unittest.TestCase): dotfiles.add([os.path.join(self.homedir, package_file)]) - def test_single_sync(self): """ Test syncing a single file in the repo @@ -361,6 +360,26 @@ class DotfilesTestCase(unittest.TestCase): dotfiles.add(['.config']) self.assertFalse(os.path.islink(os.path.join(self.homedir, '.config'))) + def test_no_dot_prefix(self): + # define the repository contents + repo_files = ('bashrc', 'netrc', 'vimrc') + + # populate the repository + for dotfile in repo_files: + touch(os.path.join(self.repository, dotfile)) + + dotfiles = Dotfiles( + homedir=self.homedir, path=self.repository, + prefix='', ignore=[], externals={}, packages=[], + dry_run=False, no_dot_prefix=True) + + dotfiles.sync() + + # verify home directory contents + for dotfile in repo_files: + self.assertPathEqual( + os.path.join(self.repository, dotfile), + os.path.join(self.homedir, dotfile)) @pytest.mark.xfail() def test_add_package_file(self): |