basic.janet 704 B

1234567891011121314151617181920
  1. (use ../src/main)
  2. #A simple hello world lllm program:a
  3. (print "Checking for NASM...")
  4. (assert (= 0 (os/execute ["/bin/nasm" "-v"])))
  5. (print "NASM OK.\n
  6. Attempting base test link...")
  7. (link "./examples/unit-test.janet" "")
  8. (print "Base test link OK. Checking if output is as expected...")
  9. (def resrun (:read ( (os/spawn ["./examples/unit-test"] :p {:out :pipe} ) :out) :all) )
  10. (assert (deep= resrun #deep= as = would check instances and not values.
  11. @"Base test program for llllm and lllm.\n"))
  12. (print "BASE LINK OK.")
  13. (print "System seems sufficiently capable.\n
  14. Erasing base test build...")
  15. (os/execute ["/bin/rm" "./examples/unit-test"])
  16. (print "Good job, all tests passed!")
  17. (os/exit)