Basic stack tests
[jonesforth.git] / test_stack.f
diff --git a/test_stack.f b/test_stack.f
new file mode 100644 (file)
index 0000000..e8e558d
--- /dev/null
@@ -0,0 +1,17 @@
+( -*- text -*- )
+
+: TEST
+       DEPTH . CR
+
+       42 DUP . . CR
+       23 DROP DEPTH . CR
+       1 2 SWAP . . CR
+       1 2 OVER . . . CR
+       1 2 3 ROT . . . CR
+       1 2 3 -ROT . . . CR
+       1 2 3 4 2DROP . . CR
+       1 2 3 4 2DUP . . . . . . CR
+       1 2 3 4 2SWAP . . . . CR
+
+       DEPTH . CR
+;