#!/usr/bin/python

# @ Martin Kellogg

# a utility file to do things that python is better than bash at doing (i.e. math and/or string manipulation)

import sys

if sys.argv[1] == "test-list":
    fd = open("php-run-tests.c")
    for ln in fd:
        if ln.strip().startswith('"'):
            print ln.strip()

if sys.argv[1] == "find-negs":
    fd = open("test.sh")
    for ln in fd:
        if not ln.strip().startswith("n"):
            continue
        rgln = ln.strip().split()
        if rgln[1] != "run_test":
            continue
        print rgln[2]
        
