Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs on continuation lines break GAP's testing #3068

Closed
markuspf opened this issue Nov 28, 2018 · 2 comments · Fixed by #3375
Closed

Tabs on continuation lines break GAP's testing #3068

markuspf opened this issue Nov 28, 2018 · 2 comments · Fixed by #3375
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them topic: tests issues or PRs related to tests

Comments

@markuspf
Copy link
Member

if one uses tab characters on continuation lines in a test file, this confuses GAP:

gap> f := function()
>\tlocal a;
>\tif a = 0 then
>\t\tError("a is zero");
>\tfi;
> end;;
########> Diff in tab.tst:1         
# Input is:
f := function()
	local a;
		Error("a is zero");
end;;
# Expected output:
>	if a = 0 then
>	fi;
# But found:
########
false
@markuspf markuspf added kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them topic: tests issues or PRs related to tests labels Nov 28, 2018
@ChrisJefferson
Copy link
Contributor

There is another bug here, which I think is making this one harder to spot. GAP allows continuation lines in the middle of the output, and puts them as part of the input.

gap> x := 2 +
>	cheese
> 2;
3

gives:

########> Diff in t.tst:1           
# Input is:
x := 2 +
2;
# Expected output:
>	cheese
3
# But found:
4
########
false

@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
@ChrisJefferson
Copy link
Contributor

ChrisJefferson commented Mar 23, 2019

This issue has been improved somewhat. Further improves were unfortunately difficult due to the fact that some package rely on not this specific case, but similar cases where tests are formatted strangely. Therefore I think we should close this as "as fixed as it will get".

EDIT: Came up with a slightly hacky idea, #3375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them topic: tests issues or PRs related to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants