Remove some unused shit and write tests for coverage
This commit is contained in:
@@ -417,14 +417,14 @@ files = ["test.txt"
|
||||
assert.NoError(t, err, "Should handle non-existent file without error")
|
||||
assert.Empty(t, commands, "Should return empty commands for non-existent file")
|
||||
|
||||
// Test 3: Empty TOML file creates an error (this is expected behavior)
|
||||
// Test 3: Empty TOML file returns no commands (not an error)
|
||||
emptyFile := filepath.Join(tmpDir, "empty.toml")
|
||||
err = os.WriteFile(emptyFile, []byte(""), 0644)
|
||||
assert.NoError(t, err, "Should write empty TOML file")
|
||||
|
||||
commands, _, err = utils.LoadCommandsFromTomlFiles("empty.toml")
|
||||
assert.Error(t, err, "Should return error for empty TOML file")
|
||||
assert.Nil(t, commands, "Should return nil commands for empty TOML")
|
||||
assert.NoError(t, err, "Empty TOML should not return error")
|
||||
assert.Empty(t, commands, "Should return empty commands for empty TOML")
|
||||
}
|
||||
|
||||
func TestYAMLToTOMLConversion(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user