2011-01-05 21:52:08 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from nose.tools import *
|
|
|
|
from subprocess import call
|
|
|
|
import os
|
|
|
|
|
|
|
|
#import os, sys, glob, mapnik2
|
|
|
|
|
|
|
|
def test():
|
|
|
|
# mapnik-config program
|
|
|
|
# should be on default path...
|
|
|
|
mc = 'mapnik-config'
|
|
|
|
valid = ['--help',
|
|
|
|
'--prefix',
|
|
|
|
'--libs',
|
2011-08-13 19:07:05 +02:00
|
|
|
'--dep-libs',
|
|
|
|
'--ldflags',
|
2011-01-05 21:52:08 +01:00
|
|
|
'--cflags',
|
|
|
|
'--fonts',
|
|
|
|
'--input-plugins',
|
|
|
|
'-v',
|
|
|
|
'--version',
|
|
|
|
'--svn-revision',
|
|
|
|
]
|
|
|
|
|
|
|
|
# valid args should return 1
|
|
|
|
for item in valid:
|
|
|
|
eq_(0,call([mc,item]))
|
|
|
|
|
|
|
|
# errors should return 1
|
2011-08-31 00:36:06 +02:00
|
|
|
#eq_(1,call([mc,'']))
|
|
|
|
#eq_(1,call([mc,'foo']))
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
[eval(run)() for run in dir() if 'test_' in run]
|