-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exp, Map, toenv, tap_tap usability, examples and test improvements
exp is now able to create Txt entries on the fly using ="value", removing the need for intermediate user variables for it. tap_tap had a bug that prevented failed tests with no output from reporting, this was fixed toenv was not properly serializing all references to a Map, this was fixed A mini how-to on working with datastructures is now on the examples folder.
- Loading branch information
Showing
7 changed files
with
71 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This example is subject to change | ||
|
||
data_structures () { | ||
local breakfast= fruit_list= fruits_iterator= fruit_reference= fruit= | ||
|
||
# Declaring and working with pseudotypes | ||
val fruit_list = [ Lst ="banana" ="apple" ="orange" ="grape" ] | ||
val breakfast = [ Map :beverage ="coffee" :fruit $fruit_list ] | ||
|
||
# Prints the internal data structure | ||
toenv $breakfast | ||
_print "## Internals\n$REPLY" | ||
|
||
# Dumps it in a human readable way | ||
dump $breakfast | ||
_print "## Dumped\n$REPLY\n\n" | ||
|
||
# How to iterate over a traversable type | ||
val fruits_iterator =@ $fruit_list | ||
for fruit_reference in $fruits_iterator | ||
do | ||
val fruit =@ $fruit_reference | ||
_print "Fruit was served: $fruit\n" | ||
done | ||
} |
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
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