[agent/codex:gpt-5.4-mini] Read docs/RFC-STORE.md and docs/specs/core/go/RFC.md fully. ... #168
2 changed files with 11 additions and 1 deletions
|
|
@ -32,10 +32,10 @@ func (compactOptions CompactOptions) Normalised() CompactOptions {
|
|||
if compactOptions.Output == "" {
|
||||
compactOptions.Output = defaultArchiveOutputDirectory
|
||||
}
|
||||
compactOptions.Format = lowerText(core.Trim(compactOptions.Format))
|
||||
if compactOptions.Format == "" {
|
||||
compactOptions.Format = "gzip"
|
||||
}
|
||||
compactOptions.Format = lowerText(core.Trim(compactOptions.Format))
|
||||
return compactOptions
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -223,6 +223,16 @@ func TestCompact_CompactOptions_Good_ValidateNormalisesFormatCase(t *testing.T)
|
|||
assert.Equal(t, "zstd", options.Format)
|
||||
}
|
||||
|
||||
func TestCompact_CompactOptions_Good_ValidateWhitespaceFormatDefaultsToGzip(t *testing.T) {
|
||||
options := (CompactOptions{
|
||||
Before: time.Now().Add(-24 * time.Hour),
|
||||
Format: " ",
|
||||
}).Normalised()
|
||||
|
||||
assert.Equal(t, "gzip", options.Format)
|
||||
require.NoError(t, options.Validate())
|
||||
}
|
||||
|
||||
func TestCompact_CompactOptions_Bad_ValidateUnsupportedFormat(t *testing.T) {
|
||||
err := (CompactOptions{
|
||||
Before: time.Now().Add(-24 * time.Hour),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue