public class TreeWalkAttributeTest extends RepositoryTestCase
TreeWalk.TreeWalk.getAttributes()db, trashASSUME_UNCHANGED, author, committer, CONTENT, CONTENT_ID, LENGTH, mockSystemReader, MOD_TIME, SMUDGE| Constructor and Description |
|---|
TreeWalkAttributeTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp() |
void |
tearDown() |
void |
testAggregation()
Checks that the list of attributes is an aggregation of all the
attributes from the attributes files hierarchy.
|
void |
testCheckinCheckoutDifferences()
Checks that the attributes are computed correctly depending on the
operation type.
|
void |
testEmptyGitAttributeFile()
Checks that an empty .gitattribute file does not return incorrect value.
|
void |
testHierarchyBothIterator()
Checks the precedence on a hierarchy with multiple attributes.
|
void |
testHierarchyWorktreeOnly()
Checks the precedence on a hierarchy with multiple attributes.
|
void |
testIndexOnly()
Checks that the index is used as fallback when the git attributes file
are missing in the working tree.
|
void |
testIndexOnly2()
Check that we search in the working tree for attributes although the file
we are currently inspecting does not exist anymore in the working tree.
|
void |
testNoAttributes()
Checks that if there is no .gitattributes file in the repository
everything still work fine.
|
void |
testNoMatchingAttributes() |
void |
testOverriding()
Checks that the last entry in .gitattributes is used if 2 lines match the
same attribute
|
void |
testOverriding2()
Checks that the last value of an attribute is used if in the same line an
attribute is defined several time.
|
void |
testPrecedenceCurrent()
Checks that a subfolder ".gitattributes" file has precedence over its
parent.
|
void |
testPrecedenceGlobal()
Checks that the global attribute file is used as fallback.
|
void |
testPrecedenceInfo()
Checks that $GIT_DIR/info/attributes file has the highest precedence.
|
void |
testPrecedenceParent()
Checks that the parent ".gitattributes" file is used as fallback.
|
void |
testPrecedenceRoot()
Checks that the grand parent ".gitattributes" file is used as fallback.
|
void |
testRules()
Basic test for git attributes.
|
void |
testRulesInherited() |
assertEqualsFile, check, checkFile, checkoutBranch, commitFile, copyFile, createBranch, createEntry, createEntry, createEntry, deleteTrashFile, fsTick, indexState, lookup, read, resetIndex, slashify, writeLink, writeTrashFile, writeTrashFile, writeTrashFilesaddRepoToClose, createBareRepository, createRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, indexState, read, recursiveDelete, runHook, tick, write, writepublic void setUp()
throws Exception
setUp in class RepositoryTestCaseExceptionpublic void tearDown()
throws Exception
tearDown in class LocalDiskRepositoryTestCaseExceptionpublic void testCheckinCheckoutDifferences()
throws IOException,
NoFilepatternException,
GitAPIException
In this test we changed the content of the attribute files in the working tree compared to the one in the index.
public void testIndexOnly()
throws IOException,
NoFilepatternException,
GitAPIException
public void testIndexOnly2()
throws IOException,
NoFilepatternException,
GitAPIException
public void testRules()
throws IOException,
NoFilepatternException,
GitAPIException
In this use case files are present in both the working tree and the index
public void testNoAttributes()
throws IOException
IOExceptionpublic void testEmptyGitAttributeFile()
throws IOException
IOExceptionpublic void testNoMatchingAttributes()
throws IOException
IOExceptionpublic void testPrecedenceInfo()
throws IOException
IOExceptionpublic void testPrecedenceCurrent()
throws IOException
IOExceptionpublic void testPrecedenceParent()
throws IOException
IOExceptionpublic void testPrecedenceRoot()
throws IOException
IOExceptionpublic void testPrecedenceGlobal()
throws IOException
IOExceptionpublic void testHierarchyBothIterator()
throws IOException,
NoFilepatternException,
GitAPIException
In this test all file are present in both the working tree and the index.
public void testHierarchyWorktreeOnly()
throws IOException,
NoFilepatternException,
GitAPIException
In this test all file are present only in the working tree.
public void testAggregation()
throws IOException
IOExceptionpublic void testOverriding()
throws IOException
IOExceptionpublic void testOverriding2()
throws IOException
IOExceptionCopyright © 2017 Eclipse JGit Project. All rights reserved.