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

Unit tests: 5 failures related to ~ expansion #128

Closed
mgorny opened this issue Jun 30, 2017 · 0 comments
Closed

Unit tests: 5 failures related to ~ expansion #128

mgorny opened this issue Jun 30, 2017 · 0 comments

Comments

@mgorny
Copy link
Contributor

mgorny commented Jun 30, 2017

		=== unit tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/default.exp as tool-and-target-specific interface file.
Running ./unit/__expand_tilde_by_ref.exp ...
FAIL: ~user should return /home/user
FAIL: ~user/bar should return /home/user/bar
FAIL: ~user/$HOME should return /home/user/$HOME
FAIL: '~user/a  b' should return '/home/user/a  b'
FAIL: ~user/* should return /home/user/*
Running ./unit/_count_args.exp ...
Running ./unit/_filedir.exp ...
Running ./unit/_get_comp_words_by_ref.exp ...
Running ./unit/_get_cword.exp ...
Running ./unit/_init_completion.exp ...
Running ./unit/_known_hosts_real.exp ...
Running ./unit/_parse_help.exp ...
Running ./unit/_parse_usage.exp ...
Running ./unit/_tilde.exp ...
Running ./unit/_variables.exp ...
Running ./unit/compgen.exp ...
Running ./unit/find_unique_completion_pair.exp ...
Running ./unit/quote.exp ...

		=== unit Summary ===

# of expected passes		201
# of unexpected failures	5
# of unsupported tests		1
/tmp/bash-completion/test, bash-4.4.12(1)-release

log/unit.log: https://gist.github.com/mgorny/f82dc507f21387eccd0e441ac81c9f86

The relevant bits seem to be e.g.:

/@echo "$HOME"
./config
/@echo $?
0
/@echo "$USER"
mgorny

[...]

/@var="~mgorny"; __expand_tilde_by_ref var; printf "%s\n" "$var"
/home/mgorny
/@FAIL: ~user should return /home/user
^C
/@var='~/foo'; __expand_tilde_by_ref var; printf "%s\n" "$var"
./config/foo
/@PASS: ~/foo should return /home/user/foo

Which indicates that $HOME gets overriden for some reason. FWICS, it happens inside config/bashrc, and is due to c96f432. I can confirm that reverting this commit (i.e. removing the HOME override) makes the tests succeed.

@scop scop closed this as completed in d231255 Jul 1, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant