File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Commands.Bash.run("ls /bin/ls").log()
2323Commands . Ruby. run ( " require 'base64'; puts Base64.encode64('qiuzhifei') " ) . log ( )
2424
2525// Python
26- Commands . Python. run ( " import base64; print(base64.b64encode('qiuzhifei').decode('ascii')) " ) . log ( )
26+ Commands . Python. run ( " import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii')) " ) . log ( )
2727
2828// Custom
2929let node = Commands . Alias ( " node " , dashc: " -e " )
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ let result = Commands.Task.run("python main.py")
3737```
3838Execute python commands.
3939``` swift
40- let result = Commands.Task .run (" python -c import base64; print(base64.b64encode('qiuzhifei').decode('ascii'))" )
40+ let result = Commands.Task .run (" python -c import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii'))" )
4141```
4242Or
4343``` swift
44- let result = Commands.Python .run (" import base64; print(base64.b64encode('qiuzhifei').decode('ascii'))" )
44+ let result = Commands.Python .run (" import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii'))" )
4545```
4646
4747### Ruby
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ let result = Commands.Task.run("python main.py")
3737```
3838Execute python commands.
3939``` swift
40- let result = Commands.Task .run (" python -c import base64; print(base64.b64encode('qiuzhifei').decode('ascii'))" )
40+ let result = Commands.Task .run (" python -c import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii'))" )
4141```
4242Or
4343``` swift
44- let result = Commands.Python .run (" import base64; print(base64.b64encode('qiuzhifei').decode('ascii'))" )
44+ let result = Commands.Python .run (" import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii'))" )
4545```
4646
4747### Ruby
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public extension Commands.Task {
3636 }
3737
3838 let response = Commands . Response ( statusCode: process. terminationStatus,
39- output: errorActual ,
39+ output: outputActual ,
4040 errorOutput: errorActual)
4141 return Commands . Result. Failure ( request, response: response)
4242 } catch let error {
Original file line number Diff line number Diff line change 11import base64 ;
2- print (base64 .b64encode ('qiuzhifei' ).decode ('ascii' ));
2+ print (base64 .b64encode (b 'qiuzhifei' ).decode ('ascii' ));
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ final class swift_commandsTests: XCTestCase {
1515
1616 let lsResult = Commands . Bash. run ( " ls \( dir) " )
1717 XCTAssert ( lsResult. isFailure)
18- XCTAssert ( lsResult. output . contains ( " No such file or directory " ) )
18+ XCTAssert ( lsResult. errorOutput . contains ( " No such file or directory " ) )
1919 }
2020
2121 func testCommandsRuby( ) throws {
@@ -32,7 +32,7 @@ final class swift_commandsTests: XCTestCase {
3232 func testCommandsPython( ) throws {
3333 let python = Commands . Python
3434
35- let base64Result = python. run ( " import base64; print(base64.b64encode('qiuzhifei').decode('ascii')) " )
35+ let base64Result = python. run ( " import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii')) " )
3636 XCTAssert ( base64Result. isSuccess)
3737 XCTAssert ( base64Result. output == " qiuzhifei " . data ( using: . utf8) !. base64EncodedString ( ) )
3838 XCTAssert ( base64Result. output == " cWl1emhpZmVp " )
@@ -90,8 +90,8 @@ final class swift_commandsTests: XCTestCase {
9090
9191 // python
9292 XCTAssertEqual (
93- Commands . Python. run ( " import base64; print(base64.b64encode('qiuzhifei').decode('ascii')) " ) ,
94- Commands . Task. run ( " python -c import base64; print(base64.b64encode('qiuzhifei').decode('ascii')) " )
93+ Commands . Python. run ( " import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii')) " ) ,
94+ Commands . Task. run ( " python -c import base64; print(base64.b64encode(b 'qiuzhifei').decode('ascii')) " )
9595 )
9696
9797 // node
You can’t perform that action at this time.
0 commit comments