()
| 37 | # Test program. |
| 38 | |
| 39 | def test(): |
| 40 | if not sys.argv[3:]: |
| 41 | print('usage: python makeconfig.py config.c.in outputfile', end=' ') |
| 42 | print('modulename ...') |
| 43 | sys.exit(2) |
| 44 | if sys.argv[1] == '-': |
| 45 | infp = sys.stdin |
| 46 | else: |
| 47 | infp = open(sys.argv[1]) |
| 48 | if sys.argv[2] == '-': |
| 49 | outfp = sys.stdout |
| 50 | else: |
| 51 | outfp = open(sys.argv[2], 'w') |
| 52 | makeconfig(infp, outfp, sys.argv[3:]) |
| 53 | if outfp != sys.stdout: |
| 54 | outfp.close() |
| 55 | if infp != sys.stdin: |
| 56 | infp.close() |
| 57 | |
| 58 | if __name__ == '__main__': |
| 59 | test() |
no test coverage detected
searching dependent graphs…