summaryrefslogtreecommitdiff
path: root/mountain_pass/downloader_test.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-03 08:25:07 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-03 08:25:07 +0200
commit9707f9ad09db935af7d06b5de08bc52de13ba6a7 (patch)
tree34bcd01e5eda302a8730bf0817d5dd7e82186359 /mountain_pass/downloader_test.go
parentf06a10982ab9d5aaa7d31cea31964431fa75f253 (diff)
feat: Detect mountain pass crossings, name climbs after passes, render ride charts
- osmpass: extract mountain_pass=yes nodes from an OSM PBF, enrich centcols passes with OSM coordinates, resumable -fetch-osm download - mountain_pass: DetectCrossings for a ride, MatchClimb to name a climb after the pass it tops - ride: expose Points(), add Climb.Top() and Climb.Name - chart: -chart renders elevation profile with climb bands and pass markers - commands: -fetch-osm, -extract-osm, -import-cached, -enrich
Diffstat (limited to 'mountain_pass/downloader_test.go')
-rw-r--r--mountain_pass/downloader_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/mountain_pass/downloader_test.go b/mountain_pass/downloader_test.go
index f4ffcc8..f7f5dda 100644
--- a/mountain_pass/downloader_test.go
+++ b/mountain_pass/downloader_test.go
@@ -1,4 +1,4 @@
-package mountainpass
+package mountain_pass
import (
"os"
@@ -47,7 +47,7 @@ func TestSplitCountryDepartment(t *testing.T) {
func TestLoadCachedDepartment(t *testing.T) {
cacheFile := filepath.Join(t.TempDir(), "debug_department_01.csv")
- err := os.WriteFile(cacheFile, []byte("Brevet\tcode\tnom\taltitude\nFR-01\tFR-01-1500\tCol du Colombier\t1498\n"), 0644)
+ err := os.WriteFile(cacheFile, []byte("Brevet\tcode\tnom\taltitude\nFR-01\tFR-01-1500\tCol du Colombier\t1498\n"), 0o644)
require.NoError(t, err)
mountainPasses, found, err := loadCachedDepartment(cacheFile)
@@ -65,7 +65,7 @@ func TestLoadCachedDepartmentMissing(t *testing.T) {
func TestLoadCachedDepartmentCorrupt(t *testing.T) {
cacheFile := filepath.Join(t.TempDir(), "debug_department_01.csv")
- err := os.WriteFile(cacheFile, []byte("Brevet\tcode\tnom\taltitude\nFR-01\n"), 0644)
+ err := os.WriteFile(cacheFile, []byte("Brevet\tcode\tnom\taltitude\nFR-01\n"), 0o644)
require.NoError(t, err)
mountainPasses, found, err := loadCachedDepartment(cacheFile)