Teste de Segurança - Filesystem

Modo: all | Teste: list_dir
2 Total de testes
2 Sucessos
0 Falhas
Executar todos Somente nativo Somente comandos Unix Listar diretório Ler arquivo Gravar arquivo
Caminhos configurados:
{
  "TEST_BASE_DIR": "/home/t/testenjs48",
  "TEST_LIST_DIR": "/home/t/testenjs48/lib",
  "TEST_READ_FILE": "/home/t/testenjs48/lib/existe.txt",
  "TEST_CREATE_FILE": "/home/t/testenjs48/lib/arquivo.txt",
  "TEST_WRITE_FILE": "/home/t/testenjs48/lib/arquivo.txt",
  "TEST_DELETE_FILE": "/home/t/testenjs48/lib/arquivo.txt",
  "TEST_CREATE_DIR": "/home/t/testenjs48/lib/pasta",
  "TEST_CHECK_DIR": "/home/t/testenjs48/lib/pasta"
}

Nativo da linguagem

Listar diretório Sucesso
[
  {
    "name": "arquivo.txt",
    "type": "file"
  },
  {
    "name": "existe.txt",
    "type": "file"
  },
  {
    "name": "node",
    "type": "directory"
  },
  {
    "name": "novo_dir",
    "type": "directory"
  }
]

Comandos de sistema

Listar diretório Sucesso
{
  "stdout": "total 48\ndrwxrwx--T+ 4 root       testenjs48 512 Nov 22 20:04 .\ndr-xr-x--T  6 root       testenjs48 512 Sep 27 14:51 ..\n-rw-rw-rw-  1 testenjs48 testenjs48 132 Nov 22 20:04 arquivo.txt\n-rw-r-----  1 testenjs48 testenjs48   0 Oct 23 10:37 existe.txt\ndrwxr-x---  4 testenjs48 testenjs48 512 Oct 23 10:38 node\ndrwxrwxrwx  2 testenjs48 testenjs48 512 Oct 23 10:27 novo_dir\n",
  "stderr": ""
}