-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix steps to work with paths with \n \t in them (#93)
* Use custom, lexically ordered, base64 encoding for all paths that will be read by WRStat.
- Loading branch information
Showing
12 changed files
with
241 additions
and
178 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
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,17 @@ | ||
package encode | ||
|
||
import "testing" | ||
|
||
func TestEncodeDecode(t *testing.T) { | ||
for n, test := range [...]string{ | ||
"", | ||
"abc", | ||
"/some/path/", | ||
} { | ||
if output, err := Base64Decode(Base64Encode(test)); err != nil { | ||
t.Errorf("test %d: unexpected error: %s", n+1, err) | ||
} else if output != test { | ||
t.Errorf("test %d: expected output %q, got %q", n+1, test, output) | ||
} | ||
} | ||
} |
Oops, something went wrong.