package store

import (
	
	
	
)

// MustGetTempStore returns a Store backed by a temporary file, and a cleanup
// function that should be called when the Store is no longer used.
func () (DBStore, func()) {
	,  := ioutil.TempFile("", "elvish.test")
	if  != nil {
		panic(fmt.Sprintf("Failed to open temp file: %v", ))
	}
	,  := NewStore(.Name())
	if  != nil {
		panic(fmt.Sprintf("Failed to create Store instance: %v", ))
	}
	return , func() {
		.Close()
		.Close()
		 = os.Remove(.Name())
		if  != nil {
			fmt.Fprintln(os.Stderr, "failed to remove temp file:", )
		}
	}
}