2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Comments in odd places don't cause problems
|
2005-09-20 21:31:55 +08:00
|
|
|
1a
|
|
|
|
1b
|
|
|
|
2a
|
|
|
|
2b
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Escaped newlines
|
2012-11-22 17:09:07 +08:00
|
|
|
foo bar
|
|
|
|
foobar
|
|
|
|
foobar
|
|
|
|
foo\
|
|
|
|
bar
|
2012-11-24 04:03:36 +08:00
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Simple function tests
|
2005-09-20 21:31:55 +08:00
|
|
|
Test 2 pass
|
2017-07-04 06:36:38 +08:00
|
|
|
Test 3a pass
|
|
|
|
Test 3b pass
|
2010-11-23 23:05:21 +08:00
|
|
|
Test 4 pass
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
2019-04-14 01:04:44 +08:00
|
|
|
# Testing builtin status
|
2010-11-24 00:35:56 +08:00
|
|
|
Test 5 pass
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
2017-06-19 13:25:00 +08:00
|
|
|
# echo tests
|
2012-10-17 17:56:03 +08:00
|
|
|
abc\ndef
|
|
|
|
abc
|
|
|
|
def
|
|
|
|
abc\zdef
|
|
|
|
abc!def
|
|
|
|
abc!def
|
|
|
|
abcQdef
|
|
|
|
abcQ2def
|
|
|
|
abc
|
2014-05-16 15:19:07 +08:00
|
|
|
-
|
2017-06-19 13:25:00 +08:00
|
|
|
-h
|
2017-02-01 10:44:02 +08:00
|
|
|
0000000 376
|
|
|
|
0000001
|
2012-10-17 17:56:03 +08:00
|
|
|
Catch your breath
|
|
|
|
abc!def
|
|
|
|
abc!1def
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Comments allowed in between lines (#1987)
|
2015-04-06 14:47:04 +08:00
|
|
|
before comment after comment
|
2017-08-05 04:33:47 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Backslashes are part of comments and do not join lines (#1255)
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Verify $argv set correctly in sourced scripts (#139)
|
2016-04-07 04:04:44 +08:00
|
|
|
source argv {}
|
|
|
|
source argv {}
|
|
|
|
source argv {abc}
|
|
|
|
source argv {abc def}
|
2014-02-12 17:39:06 +08:00
|
|
|
1
|