You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first test works using Data and result().
But I'm not sure how to test the second one. The function insert_blank_above_a takes two arguments, input and a string.
How to test a function that takes more than one arguments?
I have functions with three, four arguments as well.
Can I use Data as a argument?
Describe 'Space editor'
Data
#|foo
#|bar
#|baz
End
Describe 'double_space'
It 'outputs no more than one blank line between lines of text'
result() {
%text
#|foo
#|
#|bar
#|
#|baz
}
When call double_space
The output should eq "$(result)"
End
End
Describe 'insert_blank_above_a'
It 'outputs no more than one blank line between lines of text'
result() {
%text
#|foo
#|bar
#|
#|baz
}
When call insert_blank_above_a Data bar
The output should eq "$(result)"
End
End
End
The text was updated successfully, but these errors were encountered:
shinokada
changed the title
How to test a function with more than one arg
How to test a function where the first arg is Data
Nov 16, 2022
The first test works using
Data
andresult()
.But I'm not sure how to test the second one. The function
insert_blank_above_a
takes two arguments, input and a string.How to test a function that takes more than one arguments?
I have functions with three, four arguments as well.
Can I use
Data
as a argument?The text was updated successfully, but these errors were encountered: