# Test environment
Alpine_Linux_3.12.10_bash_5.0.17_BusyBox_v1.31.1
# Testing rdlink version v0.3-0-g124ae12
Testdate: 2022-03-23 10:20:57 UTC
# Conclusion
Output is still valid compared to `readlink -f` from the “GNU coreutils” package. `readlink` on BusyBox behaves slightly different.
After more results of different platforms are evaluated in the future, the tests may be shifted more to assert expected results rather than comparing output to readlink -f on each platform.
## Assertion tests ("Expected path" == rdlink)
### Assert - invalid files
✗ [ACTUAL]
/opt/rdlink/test/tmp_assert/missing_file ✔ /opt/rdlink/test/tmp_assert/missing_file
/opt/rdlink/test/tmp_assert/missd/missf ✔ -
/opt/rdlink/test/tmp_assert/miss c ✔ /opt/rdlink/test/tmp_assert/miss c
rel_a ✔ /opt/rdlink/test/tmp_assert/rel_a
../rel_b ✔ /opt/rdlink/test/rel_b
## Competition tests (readlink -f == rdlink)
### Canonicalize invalid path
✗ [ACTUAL]
///tmp//./b ✔ /tmp/b
//tmp//./b/.. ✔ -
//tmp//./b/. ✔ -
//tmp//./b/ → -
✗ /tmp/b
///notthere//...../help/. ✔ -
### Invalid files with and without valid path
✗ [ACTUAL]
/opt/rdlink/test/tmp_compete/invalid_file ✔ /opt/rdlink/test/tmp_compete/invalid_file
/invalid_file → -
✗ /invalid_file
/invalid_direcotry/invalidfile ✔ -
-v → -
✗ /opt/rdlink/test/tmp_compete/-v
../-v ✔ /opt/rdlink/test/-v
-v/.. ✔ -
### Resolving of relative links
✗ [ACTUAL]
nofile_l → -
../nofile⤶
✗ /opt/rdlink/test/nofile
nopath_l ✔ -
../nodir/nofile⤶
dir_1/file ✔ /opt/rdlink/test/tmp_compete/dir_2/dir_22/file
../dir_3_l/file⤶
### No permission to enter directory (direct and link)
✗ [ACTUAL]
nopermdir ✔ /opt/rdlink/test/tmp_compete/nopermdir
nopermdirl ✔ /opt/rdlink/test/tmp_compete/nopermdir
nopermdir⤶
lroot ✔ /
/⤶
lroothome ✔ /root
/root⤶
/ ✔ /
/root ✔ /root
/root/ ✔ /root
/root/. ✔ /root
/root/.. ✔ /
### Test - Valid links
✗ [ACTUAL]
/opt/rdlink/test/tmp_compete/a 3 ✔ /opt/rdlink/test/tmp_compete/a
/opt/rdlink/test/tmp_compete/a 2⤶
/opt/rdlink/test/tmp_compete/a ✔ /opt/rdlink/test/tmp_compete/a
/opt/rdlink/test/tmp_compete/a 2 ✔ /opt/rdlink/test/tmp_compete/a
/opt/rdlink/test/tmp_compete/a⤶
/opt/rdlink/test/tmp_compete/a 3 ✔ /opt/rdlink/test/tmp_compete/a
/opt/rdlink/test/tmp_compete/a 2⤶
/dev/stdin ✔ /dev/tty1
/proc/self/fd/0⤶
# Result : success | failed | skipped | total
29 | 4 | 0 | 33