-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
128 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"repr", | ||
"ribbit", | ||
"rlib", | ||
"rposition", | ||
"rustc", | ||
"rustfmt", | ||
"rustup", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Command line | ||
Scenario: Get an argument | ||
Given a file named "main.scm" with: | ||
"""scheme | ||
(import (scheme base) (scheme process-context)) | ||
(map write-string (command-line)) | ||
""" | ||
When I successfully run `scheme main.scm hello` | ||
Then the stdout should contain "hello" | ||
|
||
Scenario: Get two arguments | ||
Given a file named "main.scm" with: | ||
"""scheme | ||
(import (scheme base) (scheme process-context)) | ||
(map write-string (command-line)) | ||
""" | ||
When I successfully run `scheme main.scm hello world` | ||
Then the stdout should contain "hello" | ||
And the stdout should contain "world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Feature: Environment variables | ||
Scenario: Get an environment variable | ||
Given a file named "main.scm" with: | ||
"""scheme | ||
(import (scheme base) (scheme process-context)) | ||
(write-string (get-environment-variable "FOO")) | ||
""" | ||
And I set the environment variable "FOO" to "bar" | ||
When I successfully run `scheme main.scm` | ||
Then the stdout should contain exactly "bar" | ||
|
||
Scenario: Get environment variables | ||
Given a file named "main.scm" with: | ||
"""scheme | ||
(import (scheme base) (scheme process-context)) | ||
(for-each | ||
(lambda (pair) | ||
(write-string (car pair)) | ||
(write-char #\=) | ||
(write-string (cdr pair)) | ||
(newline)) | ||
(get-environment-variables)) | ||
""" | ||
And I set the environment variable "FOO" to "bar" | ||
And I set the environment variable "BAZ" to "qux" | ||
When I successfully run `scheme main.scm` | ||
Then the stdout should contain "FOO=bar" | ||
And the stdout should contain "BAZ=qux" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters