aboutsummaryrefslogtreecommitdiff
path: root/progress_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'progress_test.go')
-rw-r--r--progress_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/progress_test.go b/progress_test.go
new file mode 100644
index 0000000..1da33b6
--- /dev/null
+++ b/progress_test.go
@@ -0,0 +1,24 @@
+// +build ignore
+
+package blinkstick
+
+import (
+ "testing"
+ "time"
+)
+
+func TestProgress(t *testing.T) {
+ dev, err := Open()
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer dev.Close()
+
+ p := NewProgress(5*time.Second, 7*time.Second, 8*time.Second)
+ for i := 0; i < 8; i++ {
+ p.Update(dev)
+ time.Sleep(time.Second)
+ }
+
+ Off(dev)
+}