Go: x/tools/gopls: unified diff tests don't handle multi file patches

Created on 27 Sep 2019  路  1Comment  路  Source: golang/go

we test unified diff output by attempting to apply the patch and seeing if we get the right result, we do this because the actual content of the patch does not matter and may vary, only the results of applying it can be verified to be correct.
because the only way to apply a multi-file patch is to modify the original files, we cannot easily do this in a test (single file mode writes to a different file instead)
we need to consider attempting to copy the files to a temporary directory to apply the patches to test this.

Testing Tools gopls

Most helpful comment

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

>All comments

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

Was this page helpful?
0 / 5 - 0 ratings