1
0
mirror of https://github.com/proot-me/proot-rs.git synced 2024-11-23 13:36:17 +00:00
proot-rs/tests/cwd.bats
2021-07-27 10:27:21 -04:00

14 lines
313 B
Bash

#!/usr/bin/env bats
load helper
@test "test get and set cwd" {
run proot-rs --rootfs "$ROOTFS" --cwd /bin -- /bin/sh -c "pwd -P; cd /; pwd -P; cd /etc/; pwd -P"
[ "$status" -eq 0 ]
[ "${lines[0]}" = "/bin" ]
[ "${lines[1]}" = "/" ]
[ "${lines[2]}" = "/etc" ]
[ "${#lines[@]}" -eq 3 ]
}