From 5688f1493026eb4cf96f1abd6d961a5801f1dd26 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sat, 8 Mar 2025 18:06:19 +0000 Subject: Move *.html from htmls to testdata --- htmls/2025-02-19-isle-of-dogs.html | 2251 --------------------------------- parse_test.go | 5 +- testdata/2025-02-19-isle-of-dogs.html | 2251 +++++++++++++++++++++++++++++++++ 3 files changed, 2254 insertions(+), 2253 deletions(-) delete mode 100644 htmls/2025-02-19-isle-of-dogs.html create mode 100644 testdata/2025-02-19-isle-of-dogs.html diff --git a/htmls/2025-02-19-isle-of-dogs.html b/htmls/2025-02-19-isle-of-dogs.html deleted file mode 100644 index 13b04dd..0000000 --- a/htmls/2025-02-19-isle-of-dogs.html +++ /dev/null @@ -1,2251 +0,0 @@ -Properties To Rent in Isle Of Dogs | Rightmove
- -
- - - - -
-
- - - - - - - -
-
-
- -
- - - -
- - - - - - - - - - -
-
- - - log_in - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
-
-
to
to
Area

Price
-

Bedrooms
-

Property type

Furnished type

Type of let

Property details

Must haves

Don’t show

3 results

Terraced Houses To Rent in Isle Of Dogs, East London, 2 – 3 beds, up to £3,000, added in the last 24 hours

- - - -
\ No newline at end of file diff --git a/parse_test.go b/parse_test.go index cb04638..e8e0693 100644 --- a/parse_test.go +++ b/parse_test.go @@ -2,13 +2,14 @@ package main import ( "os" + "path/filepath" "reflect" "testing" ) func TestParse(t *testing.T) { - filename := "htmls/2025-02-19-isle-of-dogs.html" - data, err := os.ReadFile(filename) + filename := "2025-02-19-isle-of-dogs.html" + data, err := os.ReadFile(filepath.Join("testdata", filename)) if err != nil { t.Errorf("Could not read %v", filename) } diff --git a/testdata/2025-02-19-isle-of-dogs.html b/testdata/2025-02-19-isle-of-dogs.html new file mode 100644 index 0000000..13b04dd --- /dev/null +++ b/testdata/2025-02-19-isle-of-dogs.html @@ -0,0 +1,2251 @@ +Properties To Rent in Isle Of Dogs | Rightmove
+ +
+ + + + +
+
+ + + + + + + +
+
+
+ +
+ + + +
+ + + + + + + + + + +
+
+ + + log_in + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
+
to
to
Area

Price
-

Bedrooms
-

Property type

Furnished type

Type of let

Property details

Must haves

Don’t show

3 results

Terraced Houses To Rent in Isle Of Dogs, East London, 2 – 3 beds, up to £3,000, added in the last 24 hours

+ + + +
\ No newline at end of file -- cgit v1.2.3-70-g09d2