1NAME==h
2FILE=--
3CMDS=!scripts/test-webserver.sh
4EXPECT=<<EOF
5            ; [14] -r-x section size 594 named .text
6            ;-- entry0:
7            ;-- section..text:
8            ;-- .text:
9            ;-- _start:
10            0x000006a0      xor ebp, ebp
11            0x000006a2      mov r9, rdx
12            0x000006a5      pop rsi
13            0x000006a6      mov rdx, rsp
14            0x000006a9      and rsp, 0xfffffffffffffff0
15            0x000006ad      push rax
16            0x000006ae      push rsp
17            ; 0x8f0
18            0x000006af      lea r8, sym.__libc_csu_fini
19            ; 0x880
20            ; "AWAVA\x89\xffAUATL\x8d%\xfe\x04 "
21            0x000006b6      lea rcx, sym.__libc_csu_init
22            ; 0x81e
23            0x000006bd      lea rdi, main
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
25<html xmlns="http://www.w3.org/1999/xhtml">
26<head>
27<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=false" />
28	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29	<meta name="language" content="en" />
30
31	<title>radare2 webui</title>
32
33	<script type="text/javascript" src="m/vendors/jquery.min.js"></script>
34	<script type="text/javascript" src="m/r2.js"></script>
35EOF
36EXPECT_ERR=<<EOF
37
38EOF
39RUN
40
41# this test fails on newshell and windows better to mark it as broken
42NAME=r2 remote webserver two
43BROKEN=1
44FILE=--
45CMDS=<<EOF
46e cfg.newshell=true
47& !rarun2 timeout=3 daemon=1 system="r2 -e http.root=/404 -e http.port=9292 -c=h -qcq -"
48sleep 1
49=+ http://127.0.0.1:9292/cmd/
50=
51=0 ?e hello remote world
52EOF
53EXPECT=<<EOF
540 fd:-1 http://127.0.0.1:9292/cmd/
55hello remote world
56EOF
57EXPECT_ERR=<<EOF
58Cannot find http.root or http.homeroot
59Starting http server...
60open http://localhost:9292/
61r2 -C http://localhost:9292/cmd/
62EOF
63RUN
64