File: expire.feature

package info (click to toggle)
osm2pgsql 2.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,772 kB
  • sloc: cpp: 60,940; python: 1,115; ansic: 763; sh: 25; makefile: 14
file content (108 lines) | stat: -rw-r--r-- 2,697 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Feature: Changes on way with expire on zoom 0

    Background:
        Given the style file 'test_expire.lua'

        And the 0.1 grid
            | 11 | 13 |
            | 10 | 12 |

        And the OSM data
            """
            w11 v1 dV Tt1=yes Nn12,n13
            """
        When running osm2pgsql flex with parameters
            | --slim |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
            | 11     |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |


    Scenario: way is not relevant
        Given the OSM data
            """
            w10 v1 dV Ta=b Nn10,n11
            """
        And an empty grid

        When running osm2pgsql flex with parameters
            | --slim | -a |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
            | 11     |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |


    Scenario: node is not relevant
        Given the OSM data
            """
            n1 v2 dV x1 y2
            """
        And an empty grid

        When running osm2pgsql flex with parameters
            | --slim | -a |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
            | 11     |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |


    Scenario: add to t1
        Given the OSM data
            """
            w10 v1 dV Tt1=yes Nn10,n11
            """
        And an empty grid

        When running osm2pgsql flex with parameters
            | --slim | -a |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
            | 10     |
            | 11     |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |
            | 0    | 0 | 0 |


    Scenario: change in t1
        Given the OSM data
            """
            w11 v2 dV Ta=b Nn10,n11
            """
        And an empty grid

        When running osm2pgsql flex with parameters
            | --slim | -a |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |
            | 0    | 0 | 0 |


    Scenario: remove from t1
        Given the OSM data
            """
            w11 v2 dD
            """
        And an empty grid

        When running osm2pgsql flex with parameters
            | --slim | -a |

        Then table osm2pgsql_test_t1 contains exactly
            | way_id |
        Then table osm2pgsql_test_expire contains exactly
            | zoom | x | y |
            | 0    | 0 | 0 |