|
|
@ -1,7 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
garble -literals build
|
|
|
|
garble -literals build
|
|
|
|
exec ./main$exe
|
|
|
|
exec ./main$exe
|
|
|
|
cmp stdout main.stdout
|
|
|
|
cmp stderr main.stderr
|
|
|
|
! binsubstr main$exe 'Lorem' 'ipsum' 'dolor' 'first assign' 'second assign' 'First Line' 'Second Line' 'map value' 'to obfuscate' 'also obfuscate'
|
|
|
|
! binsubstr main$exe 'Lorem' 'ipsum' 'dolor' 'first assign' 'second assign' 'First Line' 'Second Line' 'map value' 'to obfuscate' 'also obfuscate'
|
|
|
|
|
|
|
|
|
|
|
|
binsubstr main$exe 'Skip this block,' 'also skip this'
|
|
|
|
binsubstr main$exe 'Skip this block,' 'also skip this'
|
|
|
@ -19,8 +19,6 @@ module test/main
|
|
|
|
-- main.go --
|
|
|
|
-- main.go --
|
|
|
|
package main
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type strucTest struct {
|
|
|
|
type strucTest struct {
|
|
|
|
field string
|
|
|
|
field string
|
|
|
|
anotherfield string
|
|
|
|
anotherfield string
|
|
|
@ -58,29 +56,29 @@ func main() {
|
|
|
|
reassign := "first assign"
|
|
|
|
reassign := "first assign"
|
|
|
|
reassign = "second assign"
|
|
|
|
reassign = "second assign"
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println(cnst)
|
|
|
|
println(cnst)
|
|
|
|
fmt.Println(multiline)
|
|
|
|
println(multiline)
|
|
|
|
fmt.Println(variable)
|
|
|
|
println(variable)
|
|
|
|
fmt.Println(localVar)
|
|
|
|
println(localVar)
|
|
|
|
fmt.Println(reassign)
|
|
|
|
println(reassign)
|
|
|
|
fmt.Println(empty)
|
|
|
|
println(empty)
|
|
|
|
|
|
|
|
|
|
|
|
x := strucTest{
|
|
|
|
x := strucTest{
|
|
|
|
field: "to obfuscate",
|
|
|
|
field: "to obfuscate",
|
|
|
|
anotherfield: "also obfuscate",
|
|
|
|
anotherfield: "also obfuscate",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println(x.field)
|
|
|
|
println(x.field)
|
|
|
|
fmt.Println(x.anotherfield)
|
|
|
|
println(x.anotherfield)
|
|
|
|
|
|
|
|
|
|
|
|
testMap := map[string]string{"map key": "map value"}
|
|
|
|
testMap := map[string]string{"map key": "map value"}
|
|
|
|
fmt.Println(testMap["map key"])
|
|
|
|
println(testMap["map key"])
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println("another literal")
|
|
|
|
println("another literal")
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println(skip1, skip2)
|
|
|
|
println(skip1, skip2)
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println(i, foo, bar)
|
|
|
|
println(i, foo, bar)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-- decl_without_imports.go --
|
|
|
|
-- decl_without_imports.go --
|
|
|
@ -91,7 +89,7 @@ package main
|
|
|
|
|
|
|
|
|
|
|
|
var variable = "ipsum"
|
|
|
|
var variable = "ipsum"
|
|
|
|
|
|
|
|
|
|
|
|
-- main.stdout --
|
|
|
|
-- main.stderr --
|
|
|
|
Lorem
|
|
|
|
Lorem
|
|
|
|
First Line
|
|
|
|
First Line
|
|
|
|
Second Line
|
|
|
|
Second Line
|
|
|
|