Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89adac874b |
@@ -1358,6 +1358,33 @@ func TestCheckReportsUnreadableIndexMFAtTopOfBase(t *testing.T) {
|
|||||||
assert.Contains(t, testStderr(t, opts), "ERROR: "+defaultManifestName)
|
assert.Contains(t, testStderr(t, opts), "ERROR: "+defaultManifestName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestCheckReportsUpperCaseIndexMFAtTopOfBase checks a tree holding
|
||||||
|
// INDEX.MF at its top against a manifest that does not list it. Only the
|
||||||
|
// name index.mf, in exactly that letter case, is left out, so check reports
|
||||||
|
// INDEX.MF. The tree is in memory, where the two names are two files
|
||||||
|
// whatever the letter case rules of the host's filesystem.
|
||||||
|
func TestCheckReportsUpperCaseIndexMFAtTopOfBase(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
upperCase := strings.ToUpper(defaultManifestName)
|
||||||
|
|
||||||
|
fs := afero.NewMemMapFs()
|
||||||
|
writeTestFile(t, fs, testFile1, "hello")
|
||||||
|
|
||||||
|
opts := testOpts([]string{
|
||||||
|
testApp, cmdGenerate, "-q", "-o", testManifest, testDir,
|
||||||
|
}, fs)
|
||||||
|
require.Equal(t, 0, runCLI(opts), "stderr: %s", testStderr(t, opts))
|
||||||
|
|
||||||
|
writeTestFile(t, fs, filepath.Join(testDir, upperCase), "not listed")
|
||||||
|
|
||||||
|
opts = testOpts([]string{
|
||||||
|
testApp, cmdCheck, testFlagNoExtra, testFlagBase, testDir, testManifest,
|
||||||
|
}, fs)
|
||||||
|
assert.Equal(t, 1, runCLI(opts), "stderr: %s", testStderr(t, opts))
|
||||||
|
assert.Contains(t, testStderr(t, opts), "EXTRA: "+upperCase)
|
||||||
|
}
|
||||||
|
|
||||||
func TestGenerateAtomicWriteNoTempFileOnSuccess(t *testing.T) {
|
func TestGenerateAtomicWriteNoTempFileOnSuccess(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user