Skip to content

Commit

Permalink
Add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Jan 21, 2020
1 parent f98458f commit c068572
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c068572

Please sign in to comment.