internal/lsp: fail test if command cannot be applied

In the previous implementation, a test would pass if the given
command could not be applied to the given range.

Change-Id: I2e63972472cbd146cb5f27a3e27c878387222cb6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/246517
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/internal/lsp/lsp_test.go b/internal/lsp/lsp_test.go
index 48d1431..6c16c52 100644
--- a/internal/lsp/lsp_test.go
+++ b/internal/lsp/lsp_test.go
@@ -486,7 +486,7 @@
 		return nil, fmt.Errorf("no known command for %s", cmd)
 	}
 	if !command.Applies(ctx, snapshot, fh, rng) {
-		return nil, nil
+		return nil, fmt.Errorf("cannot apply %v", command.Name)
 	}
 	return command.SuggestedFix(ctx, snapshot, fh, rng)
 }