github.com/containers/podman/v5@v5.1.0-rc1/test/system/085-top.bats (about)

     1  #!/usr/bin/env bats
     2  
     3  load helpers
     4  
     5  @test "podman top - basic tests" {
     6      run_podman run -d $IMAGE top
     7      cid=$output
     8      is "$cid" "[0-9a-f]\{64\}$"
     9  
    10      run_podman top $cid
    11      is "${lines[0]}" "USER[ \t]*PID[ \t]*PPID[ \t]*%CPU[ \t]*ELAPSED[ \t]*TTY[ \t]*TIME[ \t]*COMMAND" "podman top"
    12      is "${lines[1]}" "root[ \t]*1[ \t]*0[ \t]*0.000[ \t]*" "podman top"
    13  
    14      run_podman top $cid -eo pid,comm
    15      is "${lines[0]}" "[ \t]*PID[ \t]*COMMAND" "podman top -eo pid,comm Heading"
    16      is "${lines[1]}" "[ \t]*1[ \t]*top" "podman top -eo pid,comm processes"
    17  
    18      run_podman top $cid -eo "pid comm"
    19      is "${lines[0]}" "[ \t]*PID[ \t]*COMMAND" "podman top -eo "pid comm" Heading"
    20      is "${lines[1]}" "[ \t]*1[ \t]*top" "podman top -eo "pid comm" processes"
    21  
    22      run_podman rm -f $cid
    23  }
    24  
    25  # vim: filetype=sh