mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-26 02:52:35 +00:00 
			
		
		
		
	 8fc862f710
			
		
	
	
		8fc862f710
		
	
	
	
	
		
			
			Also make them runnable anywhere. Previously they required $PWD to be the directory containing test-commons.inc, and for $PWD to be writable.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			562 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			562 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| source $(dirname "$0")/test-commons.inc
 | |
| 
 | |
| if not test "$*" = "" { fail "Argv list not empty" }
 | |
| if not test "$#" -eq 0 { fail "Argv list empty but count non-zero" }
 | |
| if not test "$ARGV" = "$*" { fail "\$ARGV not equal to \$*" }
 | |
| 
 | |
| ARGV=(1 2 3)
 | |
| if not test "$#" -eq 3 { fail "Assignment to ARGV does not affect \$#" }
 | |
| if not test "$*" = "1 2 3" { fail "Assignment to ARGV does not affect \$*" }
 | |
| 
 | |
| shift
 | |
| if not test "$*" = "2 3" { fail "'shift' does not work correctly" }
 | |
| 
 | |
| shift 2
 | |
| if not test "$*" = "" { fail "'shift 2' does not work correctly" }
 | |
| 
 | |
| echo PASS
 |