shithub: rgbds

Download patch

ref: 31aa1ea474ec91c7a86ddbe8817d9335fb10ec1b
parent: 96b6e4a76ea7d9ae2d8723e87016e7d12c9c1f39
author: ISSOtm <[email protected]>
date: Tue Feb 11 06:38:10 EST 2020

Improve arg-shift test

New test case courtesy of @aaaaaa123456789

--- a/test/asm/arg-shift.asm
+++ b/test/asm/arg-shift.asm
@@ -1,21 +1,32 @@
 print_all: MACRO
-    REPT _NARG
-    	PRINTT " \1"
-    	SHIFT
-    ENDR
-    PRINTT "\n"
+	REPT _NARG
+		PRINTT " \1"
+		SHIFT
+	ENDR
+	PRINTT "\n"
 ENDM
 
 print_some: MACRO
-    PRINTT "\1"
-    SHIFT 5
-    PRINTT "\2\6\9"
-    SHIFT 17
-    SHIFT
-    PRINTT "\3\9"
+	PRINTT "\1"
+	SHIFT 5
+	PRINTT "\2\6\9"
+	SHIFT 17
+	SHIFT
+	PRINTT "\3\9"
 ENDM
 
+bad: MACRO
+	shift _NARG - 1
+	PRINTT \1
+	PRINTT "\n"
+ENDM
 
 	print_all This test, probably, passes\,, but who knows, ?
 
 	print_some R,e,d,n,e,x,G,a,m,e,B,o,y,D,e,v,e,l,o,p,e,m,e,n,t,S,y,s,t,e,m,\n
+
+	bad 1, 3, 5, 1, 2, 4, 5, 6, 3, 3, 3, 6, 2, 1, "H"
+	bad "E"
+	bad 0, 1, 2, 3, "L"
+	bad 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "L"
+	bad as, asd, asdf, asdfg, asdgh, "O"
--- a/test/asm/arg-shift.out
+++ b/test/asm/arg-shift.out
@@ -1,2 +1,7 @@
  This test probably passes, but who knows ?
 RGBDS
+H
+E
+L
+L
+O