commit a test (which mksh on MirOS BSD currently fails) to test if files
starting with an UTF-8 BOM before the shebang can be executed correctly; this would succeed if either mksh parses the shebang line instead of re- lying on $EXECSHELL or the kernel supports it bsiegert@ ok's my attempts to fix this
This commit is contained in:
		
							
								
								
									
										25
									
								
								check.t
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								check.t
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| # $MirOS: src/bin/mksh/check.t,v 1.95 2007/04/15 10:45:58 tg Exp $ | # $MirOS: src/bin/mksh/check.t,v 1.96 2007/04/15 10:58:55 tg Exp $ | ||||||
| # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ | # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ | ||||||
| # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ | # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ | ||||||
| # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ | # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ | ||||||
| @@ -3928,3 +3928,26 @@ expected-stdout: | |||||||
| 	ohne | 	ohne | ||||||
| 	: mit | 	: mit | ||||||
| --- | --- | ||||||
|  | name: utf8bom-2 | ||||||
|  | description: | ||||||
|  | 	Check that we can execute BOM-shebangs | ||||||
|  | category: pdksh | ||||||
|  | env-setup: !FOO=BAR! | ||||||
|  | stdin: | ||||||
|  | 	print '#!'"$0"'\nprint "a=$ENV{FOO}";' >t1 | ||||||
|  | 	print '#!'"$0"'\nprint "a=$ENV{FOO}";' >t2 | ||||||
|  | 	print '#!/usr/bin/env perl\nprint "a=$ENV{FOO}\n";' >t3 | ||||||
|  | 	print '#!/usr/bin/env perl\nprint "a=$ENV{FOO}\n";' >t4 | ||||||
|  | 	chmod +x t? | ||||||
|  | 	EXECSHELL=$0 | ||||||
|  | 	export EXECSHELL | ||||||
|  | 	./t1 | ||||||
|  | 	./t2 | ||||||
|  | 	./t3 | ||||||
|  | 	./t4 | ||||||
|  | expected-stdout: | ||||||
|  | 	a=/nonexistant{FOO} | ||||||
|  | 	a=/nonexistant{FOO} | ||||||
|  | 	a=BAR | ||||||
|  | 	a=BAR | ||||||
|  | --- | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user