diff options
| author | Damien George | 2014-01-03 14:03:48 +0000 |
|---|---|---|
| committer | Damien George | 2014-01-03 14:03:48 +0000 |
| commit | 66028ab6dcd1b2ec9504c3473d817649935a4a1e (patch) | |
| tree | c441ee4d665b3218e235dec24dd5a66a6fe050ef /tests | |
| parent | aae7847508e2a9555ad3276c5cd4f42b2e66686c (diff) | |
Basic implementation of import.
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/basics/run-tests | 2 | ||||
| -rw-r--r-- | tests/basics/tests/import1a.py | 2 | ||||
| -rw-r--r-- | tests/basics/tests/import1b.py | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/tests/basics/run-tests b/tests/basics/run-tests index 1b027c3e9..72e69c2d8 100755 --- a/tests/basics/run-tests +++ b/tests/basics/run-tests @@ -11,7 +11,7 @@ namefailed= for infile in tests/*.py do - basename=`basename $infile .c` + basename=`basename $infile .py` outfile=${basename}.out expfile=${basename}.exp diff --git a/tests/basics/tests/import1a.py b/tests/basics/tests/import1a.py new file mode 100644 index 000000000..16b2d4d30 --- /dev/null +++ b/tests/basics/tests/import1a.py @@ -0,0 +1,2 @@ +import import1b +print(import1b.var) diff --git a/tests/basics/tests/import1b.py b/tests/basics/tests/import1b.py new file mode 100644 index 000000000..80479088f --- /dev/null +++ b/tests/basics/tests/import1b.py @@ -0,0 +1 @@ +var = 123 |
