// Copyright 2018 The Fuchsia Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#include <sys/stat.h> | |
#include "gtest/gtest.h" | |
#include "lib/fxl/files/file.h" | |
TEST(Run, TestHermeticEnv) { | |
std::string hub_name; | |
files::ReadFileToString("/hub/name", &hub_name); | |
// if this was not executed as component, /hub/name would be sys | |
EXPECT_EQ(hub_name, "env_for_test"); | |
} |