File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 77 "golang.org/x/net/html"
88 "os"
99 "path/filepath"
10+ "regexp"
1011 "strings"
1112 "testing"
1213)
@@ -23,6 +24,16 @@ func TestURLs(t *testing.T) {
2324
2425 relPath := strings .TrimPrefix (path , "/usr/src/app/allvbuild" )
2526
27+ isArchive , err := regexp .MatchString (`^/v[0-9]+\.[0-9]+/.*` , relPath )
28+ if err != nil {
29+ t .Error (err .Error (), "-" , relPath )
30+ }
31+ // skip archives for now, only test URLs in current version
32+ // TODO: test archives
33+ if isArchive {
34+ return nil
35+ }
36+
2637 if err != nil {
2738 t .Error (err .Error (), "-" , relPath )
2839 }
@@ -44,9 +55,9 @@ func TestURLs(t *testing.T) {
4455 return nil
4556 })
4657
47- fmt .Println ("found" , count , "html files" )
48- fmt .Println ("found" , countLinks , "links" )
49- fmt .Println ("found" , countImages , "images" )
58+ fmt .Println ("found" , count , "html files (excluding archives) " )
59+ fmt .Println ("found" , countLinks , "links (excluding archives) " )
60+ fmt .Println ("found" , countImages , "images (excluding archives) " )
5061}
5162
5263// testURLs tests if we're not using absolute paths for URLs
You can’t perform that action at this time.
0 commit comments