(c *C)
| 759 | } |
| 760 | |
| 761 | func (s *WorktreeSuite) TestCheckoutIndexOS(c *C) { |
| 762 | fs := s.TemporalFilesystem(c) |
| 763 | |
| 764 | w := &Worktree{ |
| 765 | r: s.Repository, |
| 766 | Filesystem: fs, |
| 767 | } |
| 768 | |
| 769 | err := w.Checkout(&CheckoutOptions{}) |
| 770 | c.Assert(err, IsNil) |
| 771 | |
| 772 | idx, err := s.Repository.Storer.Index() |
| 773 | c.Assert(err, IsNil) |
| 774 | c.Assert(idx.Entries, HasLen, 9) |
| 775 | c.Assert(idx.Entries[0].Hash.String(), Equals, "32858aad3c383ed1ff0a0f9bdf231d54a00c9e88") |
| 776 | c.Assert(idx.Entries[0].Name, Equals, ".gitignore") |
| 777 | c.Assert(idx.Entries[0].Mode, Equals, filemode.Regular) |
| 778 | c.Assert(idx.Entries[0].ModifiedAt.IsZero(), Equals, false) |
| 779 | c.Assert(idx.Entries[0].Size, Equals, uint32(189)) |
| 780 | |
| 781 | c.Assert(idx.Entries[0].CreatedAt.IsZero(), Equals, false) |
| 782 | if runtime.GOOS != "windows" { |
| 783 | c.Assert(idx.Entries[0].Dev, Not(Equals), uint32(0)) |
| 784 | c.Assert(idx.Entries[0].Inode, Not(Equals), uint32(0)) |
| 785 | c.Assert(idx.Entries[0].UID, Not(Equals), uint32(0)) |
| 786 | c.Assert(idx.Entries[0].GID, Not(Equals), uint32(0)) |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | func (s *WorktreeSuite) TestCheckoutBranch(c *C) { |
| 791 | w := &Worktree{ |
nothing calls this directly
no test coverage detected