00_bootstrap.py 811 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/python
  2. import os, sys, mmap
  3. from regression import Regression
  4. loader = './pal'
  5. # Running Bootstrap
  6. regression = Regression(loader, "bootstrap")
  7. regression.add_check(name="Basic Bootstrapping",
  8. check=lambda res: "User Program Started" in res[0].out)
  9. regression.add_check(name="One Argument Given",
  10. check=lambda res: "# of Arguments: 1" in res[0].out and \
  11. "argv[0] = file:bootstrap" in res[0].out)
  12. regression.add_check(name="Five Arguments Given",
  13. args = ['a', 'b', 'c', 'd'],
  14. check=lambda res: "# of Arguments: 5" in res[0].out and \
  15. "argv[0] = file:bootstrap" in res[0].out and \
  16. "argv[1] = a" in res[0].out and "argv[2] = b" in res[0].out and \
  17. "argv[3] = c" in res[0].out and "argv[4] = d" in res[0].out)
  18. regression.run_checks()