Details
- Reviewers
lwhsu asomers - Group Reviewers
tests - Commits
- rGc989957f28ef: printenv: Add test for printenv.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 53130 Build 50021: arc lint + arc unit
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 | ||
---|---|---|
1–2 | You can get rid of the old SVN tag. | |
usr.bin/printenv/tests/printenv_test.sh | ||
29–31 | Also, get rid of the SVN tag here. | |
36 | Let me suggest some more natural English. | |
41–42 | You don't need to invoke awk if you use fancy parameter expansion. | |
43 | This line can be a lot simpler. | |
51 | Let me suggest some more natural English. | |
55 | What is the purpose of this line? | |
65–66 | Inconsistent white space here. |
etc/mtree/BSD.tests.dist | ||
---|---|---|
76 | 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.