mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Fix 'whence -a' regression test (re: 99065353)
				
					
				
			The regression test failed on systems where 'chmod' exists at more than one location, e.g. Slackware where it's at both /bin/chmod and /usr/bin/chmod. src/cmd/ksh93/tests/builtins.sh: 'whence -a'/tracked aliases test: - In the expected value, use modified 'whence -a -p chmod' output to get all of the paths to chmod. - On failure, report both expected and actual values.
This commit is contained in:
		
							parent
							
								
									1b5bc1802a
								
							
						
					
					
						commit
						fa51a5ce3b
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -713,9 +713,10 @@ run_whence()
 | 
			
		|||
}
 | 
			
		||||
actual="$(run_whence)"
 | 
			
		||||
expected="chmod is a shell builtin
 | 
			
		||||
chmod is $(whence -p chmod)
 | 
			
		||||
$(whence -a -p chmod | sed 's/^/chmod is /')
 | 
			
		||||
chmod is a tracked alias for $(whence -p chmod)"
 | 
			
		||||
[[ $actual == $expected ]] || err_exit '`whence -a` does not work correctly with tracked aliases'
 | 
			
		||||
[[ $actual == $expected ]] || err_exit "'whence -a' does not work correctly with tracked aliases" \
 | 
			
		||||
	"(expected $(printf %q "$expected"), got $(printf %q "$actual"))"
 | 
			
		||||
 | 
			
		||||
# ======
 | 
			
		||||
# 'cd ../.foo' should not exclude the '.' in '.foo'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue