We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Proper Unicode handling and mock of the step.
It does not mock the step.
The bat step in question is roughly: output = script.bat script: '@echo off && aaa aaaaaaaaa aaaaaaaaaaaaaaaaa@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa', returnStdout: true, encoding: 'UTF-8', label: 'Batch Script (💻myhostname)'
output = script.bat script: '@echo off && aaa aaaaaaaaa aaaaaaaaaaaaaaaaa@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa', returnStdout: true, encoding: 'UTF-8', label: 'Batch Script (💻myhostname)'
The setup function / test class is roughly: import com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification
class createBuilderSpec extends JenkinsPipelineSpecification { def setup() { // ... getPipelineMock('bat')([returnStdout: true, script: 'hostname']) >> 'myhostname' // Some other step which just works fine getPipelineMock("bat")([script:'@echo off && aaa aaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa', returnStdout:true, encoding:'UTF-8', label:'Batch Script (💻myhostname)']) >> 'someresult' // ... } // ...
Spock does not handle the Unicode character, I can see it in the console:
10:11:07.598 [main] DEBUG com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification - TEST FIXTURE intercepted & redirected a call: Test : class com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification Note : pipeline step Via : [email protected] (types) : createBuilder.methodMissing Invocation : [email protected]([[script:@echo off && aaa aaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa, returnStdout:true, encoding:UTF-8, label:Batch Script (ƒÆ╗myhostname)]]) (types) : createBuilder.bat(Object[]) Forwarded To : Mock for type 'Closure' named 'getPipelineMock("bat")'.call([script:aaa aaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa, returnStdout:true, encoding:UTF-8, label:Batch Script (ƒÆ╗myhostname)]) (types) : Closure$$EnhancerByCGLIB$$923b74da.call(LinkedHashMap)
As long as the character is in there, the mock is not actually called and the 'bat' step returns null.
I'm on Windows with Java 11 64-bit and Groovy 2.4.12.
Having Unicode in Strings works fine in Jenkins.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Proper Unicode handling and mock of the step.
Actual Behavior
It does not mock the step.
Steps to Reproduce
Additional Information
The bat step in question is roughly:
output = script.bat script: '@echo off && aaa aaaaaaaaa aaaaaaaaaaaaaaaaa@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa', returnStdout: true, encoding: 'UTF-8', label: 'Batch Script (💻myhostname)'
The setup function / test class is roughly:
import com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification
Spock does not handle the Unicode character, I can see it in the console:
As long as the character is in there, the mock is not actually called and the 'bat' step returns null.
I'm on Windows with Java 11 64-bit and Groovy 2.4.12.
Having Unicode in Strings works fine in Jenkins.
The text was updated successfully, but these errors were encountered: