]> pd.if.org Git - dumppoints/blob - t/triangle.sql
added email address to README
[dumppoints] / t / triangle.sql
1 begin;
2         select plan(1);
3
4 select results_eq(
5         $have$
6         SELECT path, ST_AsText(geom) 
7         FROM (
8           SELECT (dp.ST_DumpPoints(g.geom)).* 
9           FROM
10             (SELECT 
11                'TRIANGLE ((
12                         0 0, 
13                         0 9, 
14                         9 0, 
15                         0 0
16                     ))'::geometry AS geom
17             ) AS g
18           ) j;
19         $have$,
20         $want$
21             values 
22                 ('{1,1}'::int[], 'POINT(0 0)'),
23                 ('{1,2}'::int[], 'POINT(0 9)'),
24                 ('{1,3}'::int[], 'POINT(9 0)'),
25                 ('{1,4}'::int[], 'POINT(0 0)');
26         $want$,
27         'triangle'
28 );
29
30 select finish();
31
32 rollback;
33 \q
34