Merge remote-tracking branch 'canonical/next'
[sinan.git] / smoketests / tests / gen_single_app_test.py
blobb9cc348d0a5cc65262b74c97fe899573b5240492
1 import unittest
2 import sin_testing as st
3 import pexpect
5 class TestFail(st.SmokeTest):
7 @st.sinan("gen foo")
8 def run_custom_gen(self, child, appdesc):
9 child.expect("your name> ")
10 child.sendline(appdesc.user_name)
11 child.expect("your email> ")
12 child.sendline(appdesc.email)
13 child.expect('copyright holder \("%s"\)> ' % appdesc.user_name)
14 child.sendline()
15 child.expect('project version> ')
16 child.sendline(appdesc.project_version)
17 child.expect('Please specify the ERTS version \(".*"\)> ')
18 child.sendline()
19 child.expect('Is this a single application project \("n"\)> ')
20 child.sendline("y")
21 child.expect('Would you like a build config\? \("y"\)> ')
22 child.sendline()
23 child.expect("Project was created, you should be good to go!")
24 child.expect(pexpect.EOF)
27 def test_gen_name(self):
28 appdesc = st.AppDesc(user_name = "Smoke Test Gen",
29 email = "noreply@erlware.org",
30 copyright_holder = "Smoke Test Copy, LLC.",
31 # This needs to match the gen name since
32 # we are overriding it
33 project_name = "foo",
34 project_version = "0.134.0.0")
36 self.run_custom_gen(appdesc)
39 if __name__ == '__main__':
40 unittest.main()