add: update tester now support 0 and multiple args
This commit is contained in:
		
							
								
								
									
										22
									
								
								test.sh
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								test.sh
									
									
									
									
									
								
							| @ -1,4 +1,18 @@ | |||||||
| cat src/*.🗿 tests/$1.🗿 tests/test.🗿 >tmp.🗿 | tester() | ||||||
| golemc tmp.🗿 > tmp.asm | { | ||||||
| orgaasm tmp.asm tmp.rom | 	for val in $@ | ||||||
| orgaemu tmp.rom | 	do | ||||||
|  | 		echo $val | ||||||
|  | 		cat src/*.🗿 tests/$val.🗿 tests/test.🗿 >tmp.🗿 | ||||||
|  | 		golemc tmp.🗿 > tmp.asm | ||||||
|  | 		orgaasm tmp.asm tmp.rom | ||||||
|  | 		orgaemu tmp.rom | ||||||
|  | 		echo | ||||||
|  | 	done | ||||||
|  | } | ||||||
|  | if [ $# -eq 0 ] | ||||||
|  | then | ||||||
|  | 	tester $(ls tests/ | grep -v 'test.🗿' | sed 's/^tests\///; s/\.🗿$//' | tr '\n' ' ' ); | ||||||
|  | else | ||||||
|  | 	tester $@; | ||||||
|  | fi | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user