20 lines
419 B
Go
20 lines
419 B
Go
package contracts_test
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestCurrentContractDirectoryExcludesHistoricalGenerations(t *testing.T) {
|
|
entries, err := os.ReadDir("local")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
for _, entry := range entries {
|
|
if entry.IsDir() && strings.HasPrefix(entry.Name(), "v0.") {
|
|
t.Errorf("historical contract directory %q remains in the current contract root", entry.Name())
|
|
}
|
|
}
|
|
}
|