func TestKeys(t *testing.T) {
	SetTestMode(true)
	open(func(db *bolt.DB, path string) {
		db.Update(func(tx *bolt.Tx) error {
			tx.CreateBucket([]byte("widgets"))
			tx.Bucket([]byte("widgets")).Put([]byte("0002"), []byte(""))
			tx.Bucket([]byte("widgets")).Put([]byte("0001"), []byte(""))
			tx.Bucket([]byte("widgets")).Put([]byte("0003"), []byte(""))
			return nil
		})
		db.Close()
		output := run("keys", path, "widgets")
		assert.Equal(t, "0001\n0002\n0003", output)
	})
}
Ensure that a list of keys can be retrieved for a given bucket.
package main_test
import (
	"testing"
	"github.com/boltdb/bolt"
	. "github.com/boltdb/bolt/cmd/bolt"
	"github.com/stretchr/testify/assert"
)