# Copyright 2015 The Shaderc Authors. All rights reserved.1#2# Licensed under the Apache License, Version 2.0 (the "License");3# you may not use this file except in compliance with the License.4# You may obtain a copy of the License at5#6# http://www.apache.org/licenses/LICENSE-2.07#8# Unless required by applicable law or agreed to in writing, software9# distributed under the License is distributed on an "AS IS" BASIS,10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11# See the License for the specific language governing permissions and12# limitations under the License.1314import expect15from glslc_test_framework import inside_glslc_testsuite16from placeholder import FileShader, StdinShader171819@inside_glslc_testsuite('StdInOut')20class VerifyStdinWorks(expect.ValidObjectFile):21"""Tests glslc accepts vertex shader extension (.vert)."""2223shader = StdinShader('#version 140\nvoid main() { }')24glslc_args = ['-c', '-fshader-stage=vertex', shader]252627@inside_glslc_testsuite('StdInOut')28class VerifyStdoutWorks(29expect.ReturnCodeIsZero, expect.StdoutMatch, expect.StderrMatch):3031shader = FileShader('#version 140\nvoid main() {}', '.vert')32glslc_args = [shader, '-o', '-']3334# We expect SOME stdout, we just do not care what.35expected_stdout = True36expected_stderr = ''373839