aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/tool/codeeditor/codeeditor_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/aflow/tool/codeeditor/codeeditor_test.go')
-rw-r--r--pkg/aflow/tool/codeeditor/codeeditor_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/aflow/tool/codeeditor/codeeditor_test.go b/pkg/aflow/tool/codeeditor/codeeditor_test.go
index 06a97d7af..0b066e3b5 100644
--- a/pkg/aflow/tool/codeeditor/codeeditor_test.go
+++ b/pkg/aflow/tool/codeeditor/codeeditor_test.go
@@ -105,6 +105,25 @@ foo`)
)
}
+func TestCodeeditorNopEdit(t *testing.T) {
+ dir := writeTestFile(t, "src.c", `
+line0
+line1
+`)
+ aflow.TestTool(t, Tool,
+ state{
+ KernelScratchSrc: dir,
+ },
+ args{
+ SourceFile: "src.c",
+ CurrentCode: " line0",
+ NewCode: "line0",
+ },
+ struct{}{},
+ `The edit does not change the code.`,
+ )
+}
+
func TestCodeeditorReplacement(t *testing.T) {
type Test struct {
curFile string