Details
- Reviewers
lwhsu asomers - Group Reviewers
tests - Commits
- rGc989957f28ef: printenv: Add test for printenv.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Only simple two test cases.
- using echo to check the environment value is correct and the environment variable is actually exist.
- try add env and delete the env, then use printenv to check that env.
usr.bin/printenv/tests/Makefile | ||
---|---|---|
2–3 | You can get rid of the old SVN tag. | |
usr.bin/printenv/tests/printenv_test.sh | ||
30–32 | Also, get rid of the SVN tag here. | |
37 | Let me suggest some more natural English. | |
42–43 | You don't need to invoke awk if you use fancy parameter expansion. | |
44 | This line can be a lot simpler. | |
52 | Let me suggest some more natural English. | |
56 | What is the purpose of this line? | |
66–67 | Inconsistent white space here. |
etc/mtree/BSD.tests.dist | ||
---|---|---|
75 | This is in the wrong section. Instead of cddl/usr.bin , it should be in usr.bin |
In its current state, the "base" test doesn't pass. It seems like the expected_value variable isn't getting correctly expanded. Its value is just the name of the variable. Could you please fix that?
Yes, expected_value utilizes the value of env_name as a variable name. In a POSIX shell, the primary method to achieve this is through the use of eval. If there is an alternative approach, please feel free to share it. I will update immediately. Thank you for your assistance in reviewing the code, which contained several careless mistakes XD.