(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestLocalOnlyStyles(t *testing.T) { //nolint:dupl |
| 154 | path, err := mockPath() |
| 155 | if err != nil { |
| 156 | t.Fatal(err) |
| 157 | } |
| 158 | |
| 159 | zip, err := filepath.Abs(filepath.Join(TestData, "OnlyStyles.zip")) |
| 160 | if err != nil { |
| 161 | t.Fatal(err) |
| 162 | } |
| 163 | |
| 164 | err = readPkg(zip, path, 0) |
| 165 | if err != nil { |
| 166 | t.Fatal(err) |
| 167 | } |
| 168 | |
| 169 | if !system.IsDir(filepath.Join(path, "ISC")) { |
| 170 | t.Fatal("unable to find 'ISC' in StylesPath") |
| 171 | } |
| 172 | |
| 173 | vocab := filepath.Join(path, "Vocab", "ISC_General", "accept.txt") |
| 174 | if !system.FileExists(vocab) { |
| 175 | t.Fatal("unable to find 'ISC_General' in Vocab") |
| 176 | } |
| 177 | |
| 178 | b, err := os.ReadFile(vocab) |
| 179 | if err != nil { |
| 180 | t.Fatal(err) |
| 181 | } |
| 182 | lines := strings.Split(string(b), "\n") |
| 183 | |
| 184 | if !core.StringInSlice("bar", lines) { |
| 185 | t.Fatalf("unable to find 'bar' in %v", lines) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func TestV3Pkg(t *testing.T) { |
| 190 | path, err := mockPath() |
nothing calls this directly
no test coverage detected
searching dependent graphs…