Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing test script for windows #1127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions test/cli.ls
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,21 @@ command-eq '-cp test/data/data.json.ls', [json-content ]
command-eq '-cp --json test/data/data.ls', [json-content]

# json to files
normed-json = (ext = '') ->
(normalize 'test/data/data') ++ "#ext.ls => " ++ (normalize 'test/data/data.json')

do
# implicit json
<- command-eq '-c --debug test/data/data.json.ls', ['test/data/data.json.ls => test/data/data.json']
#<- command-eq '-c --debug test/data/data.json.ls', ['test/data/data.json.ls => test/data/data.json']
<- command-eq '-c --debug test/data/data.json.ls', [normed-json '.json']
try
ok file-exists 'test/data/data.json'
eq json-content + '\n', file-read 'test/data/data.json'
finally file-delete 'test/data/data.json'

# explicit json
<- command-eq '-cj --debug test/data/data.ls', ['test/data/data.ls => test/data/data.json']
#<- command-eq '-cj --debug test/data/data.ls', ['test/data/data.ls => test/data/data.json']
<- command-eq '-cj --debug test/data/data.ls', [normed-json!]
try
ok file-exists 'test/data/data.json'
eq json-content + '\n', file-read 'test/data/data.json'
Expand Down Expand Up @@ -86,7 +91,7 @@ command-eq '-c --debug --map linked test/data/empty.ls', [
# gkz/LiveScript#953
command-eq '-m embedded test/data/runtime-error.ls', [
'Failed at: test/data/runtime-error.ls'
/ReferenceError: doesNotExist is not defined\n at Object\.<anonymous> \(.*\/test\/data\/runtime-error\.ls:2:17\).*/
/ReferenceError: doesNotExist is not defined[\r\n]{1,2} at Object\.<anonymous> \([\.\*\\\/\:a-zA-Z]*runtime-error\.ls:2:17\).*/
]

# eval+compile
Expand Down