set test "utf_pretty"

if {! [installtest_p]} { untested "$test"; return }
if {! [uprobes_p]} { untested "$test"; return }

set ::result_string {{.c8='s', .c16='t', .c32='p', .s8="stapΑΩ☺😈", .s16="stapΑΩ☺😈", .s32="stapΑΩ☺😈"}}

set srcfile "$srcdir/$subdir/$test.cxx"
set stpfile "$srcdir/$subdir/$test.stp"
set exefile "[pwd]/$test.exe"
set test_flags "compiler=g++ additional_flags=-g additional_flags=-std=c++0x"
set res [target_compile "$srcfile" "$exefile" executable "$test_flags"]
if { $res != "" } {
  verbose "target_compile failed: $res" 2
  fail "$test compile"
  untested "$test"
  return
} else {
  pass "$test compile"
}

foreach runtime [get_runtime_list] {
  if {$runtime != ""} {
    stap_run3 "$test ($runtime)" "$stpfile" -c "$exefile" --runtime=$runtime
  } else {
      stap_run3 $test "$stpfile" -c "$exefile"
  }
}
if { $verbose == 0 } { catch { exec rm -f $exefile } }
