Feature: Create GPX Track File
As a user
I want to transform existing gpx routes or multiple gpx tracks to one gpx track
In order to use them on my gps device
Scenario: Create from gpx route files
Given a gpx file named "route1.gpx"
And a gpx file named "route2.gpx"
When I successfully run `gpx_track g route1.gpx route2.gpx`
Then a gpx file named "track.gpx" should exist with "4" track nodes
Scenario: Create from gpx track files
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g track1.gpx track2.gpx`
Then a gpx file named "track.gpx" should exist with "4" track nodes
Scenario: Change output file name
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g --file track123.gpx track1.gpx track2.gpx`
Then a gpx file named "track123.gpx" should exist
Scenario: Define name
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g --name "My Name" track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
My Name
"""
Scenario: Default name
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
Track #1
"""
Scenario: Normal order track
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
WP 3
16.232316396783801
WP 4
16.232316396783801
"""
Scenario: Reverse track
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g --reverse track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
WP 2
16.232316396783801
WP 1
16.232316396783801
"""
Scenario: Single segment
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g --single-segment track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
WP 1
15.232316396783801
WP 2
15.232316396783801
WP 3
16.232316396783801
WP 4
16.232316396783801
"""
Scenario: One segment per track file
Given a gpx file named "track1.gpx"
And a gpx file named "track2.gpx"
When I successfully run `gpx_track g --single-segment=false track1.gpx track2.gpx`
Then the gpx file "track.gpx" should contain:
"""
WP 1
15.232316396783801
WP 2
15.232316396783801
WP 3
16.232316396783801
WP 4
16.232316396783801
"""