public
Description: The Nu programming language.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nu.git
nu / test / test_system.nu
100644 17 lines (13 sloc) 0.562 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;; test_system.nu
;; tests for Nu system-level operators.
;;
;; Copyright (c) 2007 Tim Burks, Neon Design Technology, Inc.
 
(class TestSystem is NuTestCase
     
     (imethod (id) testSystem is
          ('(255 22 0) each:
           (do (code)
               (set command <<-END
nush -e '(set exit (NuBridgedFunction functionWithName:"exit" signature:"vi"))' -e '(exit #{code})'END)
               (set result (system command))
               ;; make sure that we get the return code that we wanted.
               (assert_equal code result)))))