diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index 962d98b..0000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "ImportPath": "github.com/jimeh/kotaku-uk-rss", - "GoVersion": "go1.3", - "Deps": [ - { - "ImportPath": "code.google.com/p/cascadia", - "Comment": "null-30", - "Rev": "4f03c71bc42ba0015a68bea86422f0ecbb71bf70" - }, - { - "ImportPath": "code.google.com/p/go.net/html", - "Comment": "null-144", - "Rev": "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab" - }, - { - "ImportPath": "github.com/PuerkitoBio/goquery", - "Comment": "v0.3.2-27-g1e5417b", - "Rev": "1e5417b3dbc2ca68de909fb56d9095daa680a166" - }, - { - "ImportPath": "github.com/gorilla/feeds", - "Rev": "2e133eb352fab1ff3569ee169e9a3a94f69c9081" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53..0000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore deleted file mode 100644 index f037d68..0000000 --- a/Godeps/_workspace/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/pkg -/bin diff --git a/Godeps/_workspace/src/code.google.com/p/cascadia/.hgignore b/Godeps/_workspace/src/code.google.com/p/cascadia/.hgignore deleted file mode 100644 index f97c559..0000000 --- a/Godeps/_workspace/src/code.google.com/p/cascadia/.hgignore +++ /dev/null @@ -1,6 +0,0 @@ -^_ -^\. -\.out$ -\.6$ -~$ -\.orig$ diff --git a/Godeps/_workspace/src/code.google.com/p/cascadia/Makefile b/Godeps/_workspace/src/code.google.com/p/cascadia/Makefile deleted file mode 100644 index c7d7a2b..0000000 --- a/Godeps/_workspace/src/code.google.com/p/cascadia/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -include $(GOROOT)/src/Make.inc - -TARG=cascadia - -GOFILES= \ - parser.go \ - selector.go \ - -include $(GOROOT)/src/Make.pkg - -format: - gofmt -w ${GOFILES} *_test.go diff --git a/Godeps/_workspace/src/code.google.com/p/cascadia/benchmark_test.go b/Godeps/_workspace/src/code.google.com/p/cascadia/benchmark_test.go deleted file mode 100644 index cdd6eb2..0000000 --- a/Godeps/_workspace/src/code.google.com/p/cascadia/benchmark_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package cascadia - -import ( - "code.google.com/p/go.net/html" - "strings" - "testing" -) - -func MustParseHTML(doc string) *html.Node { - dom, err := html.Parse(strings.NewReader(doc)) - if err != nil { - panic(err) - } - return dom -} - -var selector = MustCompile(`div.matched`) -var doc = ` - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -` -var dom = MustParseHTML(doc) - -func BenchmarkMatchAll(b *testing.B) { - var matches []*html.Node - for i := 0; i < b.N; i++ { - matches = selector.MatchAll(dom) - } - _ = matches -} diff --git a/Godeps/_workspace/src/code.google.com/p/cascadia/parser_test.go b/Godeps/_workspace/src/code.google.com/p/cascadia/parser_test.go deleted file mode 100644 index 47dd4a6..0000000 --- a/Godeps/_workspace/src/code.google.com/p/cascadia/parser_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package cascadia - -import ( - "testing" -) - -var identifierTests = map[string]string{ - "x": "x", - "96": "", - "-x": "-x", - `r\e9 sumé`: "résumé", - `a\"b`: `a"b`, -} - -func TestParseIdentifier(t *testing.T) { - for source, want := range identifierTests { - p := &parser{s: source} - got, err := p.parseIdentifier() - - if err != nil { - if want == "" { - // It was supposed to be an error. - continue - } - t.Errorf("parsing %q: got error (%s), want %q", source, err, want) - continue - } - - if want == "" { - if err == nil { - t.Errorf("parsing %q: got %q, want error", source, got) - } - continue - } - - if p.i < len(source) { - t.Errorf("parsing %q: %d bytes left over", source, len(source)-p.i) - continue - } - - if got != want { - t.Errorf("parsing %q: got %q, want %q", source, got, want) - } - } -} - -var stringTests = map[string]string{ - `"x"`: "x", - `'x'`: "x", - `'x`: "", - "'x\\\r\nx'": "xx", - `"r\e9 sumé"`: "résumé", - `"a\"b"`: `a"b`, -} - -func TestParseString(t *testing.T) { - for source, want := range stringTests { - p := &parser{s: source} - got, err := p.parseString() - - if err != nil { - if want == "" { - // It was supposed to be an error. - continue - } - t.Errorf("parsing %q: got error (%s), want %q", source, err, want) - continue - } - - if want == "" { - if err == nil { - t.Errorf("parsing %q: got %q, want error", source, got) - } - continue - } - - if p.i < len(source) { - t.Errorf("parsing %q: %d bytes left over", source, len(source)-p.i) - continue - } - - if got != want { - t.Errorf("parsing %q: got %q, want %q", source, got, want) - } - } -} diff --git a/Godeps/_workspace/src/code.google.com/p/cascadia/selector_test.go b/Godeps/_workspace/src/code.google.com/p/cascadia/selector_test.go deleted file mode 100644 index 3d252ba..0000000 --- a/Godeps/_workspace/src/code.google.com/p/cascadia/selector_test.go +++ /dev/null @@ -1,536 +0,0 @@ -package cascadia - -import ( - "code.google.com/p/go.net/html" - "strings" - "testing" -) - -type selectorTest struct { - HTML, selector string - results []string -} - -func nodeString(n *html.Node) string { - switch n.Type { - case html.TextNode: - return n.Data - case html.ElementNode: - return html.Token{ - Type: html.StartTagToken, - Data: n.Data, - Attr: n.Attr, - }.String() - } - return "" -} - -var selectorTests = []selectorTest{ - { - `
This address...
`, - "address", - []string{ - "
", - }, - }, - { - ``, - "*", - []string{ - "", - "", - "", - "", - }, - }, - { - `

`, - "#foo", - []string{ - `

`, - }, - }, - { - `