-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from yashsinghcodes/fix-for-subflow-loop
[fix]: subflow execution with .#1
- Loading branch information
Showing
7 changed files
with
81 additions
and
40 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package shuffle | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestIsLoop(t *testing.T) { | ||
handlers := []struct { | ||
arg string | ||
expected bool | ||
}{ | ||
{"$exec.#1-2", true}, | ||
{"$exec.#.value.#1", true}, | ||
{"$exec.#1", false}, | ||
{"$exec", false}, | ||
{"$exec.#1.value.#2", false}, | ||
{"$start_node.#", true}, | ||
{"\n$Change_Me\n.#3.value\n", false}, | ||
{"\n\n\n\n$Change_Me\n\n.\n#\n.\n\nvalue\n\n\n", true}, | ||
} | ||
|
||
for _, tt := range handlers { | ||
result := isLoop(tt.arg) | ||
if result != tt.expected { | ||
t.Errorf("isLoop(%s) = %v; expected %v", tt.arg, result, tt.expected) | ||
} | ||
} | ||
} |
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