mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Update README.md and test code
This commit is contained in:
parent
9a856a039b
commit
b49f16ed0a
@ -1 +1 @@
|
|||||||
C language dependent package, better to compilation.
|
C language dependent package, better to compilation. ( zlib and libpng )
|
@ -28,36 +28,36 @@ func TestCopyAndPaste(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// func TestMultiCopyAndPaste(t *testing.T) {
|
func TestMultiCopyAndPaste(t *testing.T) {
|
||||||
// expected1 := "French: éèêëàùœç"
|
expected1 := "French: éèêëàùœç"
|
||||||
// expected2 := "Weird UTF-8: 💩☃"
|
expected2 := "Weird UTF-8: 💩☃"
|
||||||
|
|
||||||
// err := clipboard.WriteAll(expected1)
|
err := clipboard.WriteAll(expected1)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// t.Fatal(err)
|
t.Fatal(err)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// actual1, err := clipboard.ReadAll()
|
actual1, err := clipboard.ReadAll()
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// t.Fatal(err)
|
t.Fatal(err)
|
||||||
// }
|
}
|
||||||
// if actual1 != expected1 {
|
if actual1 != expected1 {
|
||||||
// t.Errorf("want %s, got %s", expected1, actual1)
|
t.Errorf("want %s, got %s", expected1, actual1)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// err = clipboard.WriteAll(expected2)
|
err = clipboard.WriteAll(expected2)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// t.Fatal(err)
|
t.Fatal(err)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// actual2, err := clipboard.ReadAll()
|
actual2, err := clipboard.ReadAll()
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// t.Fatal(err)
|
t.Fatal(err)
|
||||||
// }
|
}
|
||||||
// if actual2 != expected2 {
|
if actual2 != expected2 {
|
||||||
// t.Errorf("want %s, got %s", expected2, actual2)
|
t.Errorf("want %s, got %s", expected2, actual2)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
func BenchmarkReadAll(b *testing.B) {
|
func BenchmarkReadAll(b *testing.B) {
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
|
Loading…
Reference in New Issue
Block a user