brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1015 B · 4f23b6b Raw
35 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// QEMU does not detect EOF, when reading from stdin10// "echo -n" suppresses any characters after the output and so the test hangs.11// https://gitlab.com/qemu-project/qemu/-/issues/196312// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME13 14// This test hangs on Android devices that lack shell_v2, which was added in15// Android N (API 24).16// UNSUPPORTED: LIBCXX-ANDROID-FIXME && android-device-api={{2[1-3]}}17 18// <iostream>19 20// istream cin;21 22// RUN: %{build}23// RUN: echo -n 1234 > %t.input24// RUN: %{exec} %t.exe < %t.input25 26#include <iostream>27#include <cassert>28 29int main(int, char**) {30    int i;31    std::cin >> i;32    assert(i == 1234);33    return 0;34}35