From c0685725718d2ec86f0d61ba2b842da1ebd3364e Mon Sep 17 00:00:00 2001 From: Hiromu Ochiai Date: Wed, 22 Jan 2020 00:13:13 +0900 Subject: [PATCH] Add more test cases --- all_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/all_test.go b/all_test.go index a80777d..4dfa389 100644 --- a/all_test.go +++ b/all_test.go @@ -73,6 +73,16 @@ func TestCopy(t *testing.T) { Expect(t, info.Mode()&os.ModeSymlink).Not().ToBe(0) }) + When(t, "try to copy to an existing path", func(t *testing.T) { + err := Copy("testdata/case03", "testdata.copy/case03") + Expect(t, err).Not().ToBe(nil) + }) + + When(t, "try to copy READ-not-allowed source", func(t *testing.T) { + err := Copy("testdata/case06", "testdata.copy/case06") + Expect(t, err).Not().ToBe(nil) + }) + When(t, "try to copy a file to existing path", func(t *testing.T) { err := Copy("testdata/case04/README.md", "testdata/case04") Expect(t, err).Not().ToBe(nil)