Skip to content
Snippets Groups Projects
Commit f4488159 authored by Phillip Smyth's avatar Phillip Smyth
Browse files

tests/frontend/show.py: bst show default element

Added supporting folders
parent d9a558a4
No related branches found
No related tags found
Loading
kind: stack
description: |
Main stack target for the bst build test
kind: stack
description: |
Main stack target for the bst build test
# Project config for frontend build test
name: test
element-path: elements
fatal-warnings:
- bad-element-suffix
defaults:
target-element: target2.bst
kind: compose
depends:
- fileNAME: import-dev.bst
type: build
config:
# Dont try running the sandbox, we dont have a
# runtime to run anything in this context.
integrate: False
kind: import
sources:
- kind: local
path: files/dev-files
kind: stack
description: |
Main stack target for the bst build test
depends:
- compose-all.bst
#ifndef __PONY_H__
#define __PONY_H__
#define PONY_BEGIN "Once upon a time, there was a pony."
#define PONY_END "And they lived happily ever after, the end."
#define MAKE_PONY(story) \
PONY_BEGIN \
story \
PONY_END
#endif /* __PONY_H__ */
# Project config for frontend build test
name: test
element-path: elements
......@@ -46,6 +46,27 @@ def test_show_invalid_element_path(cli, datafiles):
'show',
"foo.bst"])
@pytest.mark.datafiles(DATA_DIR + "_default")
def test_show_default(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, cwd=project, silent=True, args=[
'show'])
result.assert_success()
# Get the result output of "[state sha element]" and turn into a list
results = result.output.strip().splitlines().split(" ")
expected = 'target2.bst'
assert results[2] == expected
@pytest.mark.datafiles(DATA_DIR + "_fail")
def test_show_fail(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, cwd=project, silent=True, args=[
'show'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment