From 48b6abe8a1020c809ec01578091fe0e0fbcdcb5e Mon Sep 17 00:00:00 2001 From: Benjamin Pollack Date: Sat, 21 Nov 2015 16:12:25 -0500 Subject: [PATCH] Fix use-before-define error in "make test" In the case that a test was edited, "make test" would erroneously attempt to add `test_fname` to the list of files to test...which doesn't exist in that branch. Instead, it should be adding `edited_fname` in that case. --- scripts/run_tests.xsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_tests.xsh b/scripts/run_tests.xsh index 0f43e8f72..6d96575db 100755 --- a/scripts/run_tests.xsh +++ b/scripts/run_tests.xsh @@ -36,7 +36,7 @@ elif len($ARGS) == 2 and $ARG1 == 'edited': if os.path.exists(test_fname): tests.add(test_fname) elif edited_fname.startswith('tests/'): - tests.add(test_fname) + tests.add(edited_fname) else: print('Ignoring file because I cannot find a test for: {!r}.'. format(edited_fname), file=sys.stderr)