Merge pull request #4674 from bdbaddog/fix_2281_Aliases_ignore_pre_post_add_actions
[scons.git] / test / sconsign / script / bad.py
blob5be42b985999a2709bf2de9f2a4d0cba4c48a926
1 #!/usr/bin/env python
3 # __COPYRIGHT__
5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
27 """
28 Verify that the sconsign script generates appropriate error messages when
29 passed various non-existent or bad sconsign files as arguments.
30 """
32 import TestSConsign
34 test = TestSConsign.TestSConsign(match = TestSConsign.match_re)
36 test.write('bad1', "bad1\n")
37 test.write('bad2.dblite', "bad2.dblite\n")
38 test.write('bad3', "bad3\n")
40 test.run_sconsign(arguments = "-f dblite no_sconsign",
41 stderr = "sconsign: \\[Errno 2\\] No such file or directory: 'no_sconsign'\n")
43 test.run_sconsign(arguments = "-f dblite bad1",
44 stderr = "sconsign: \\[Errno 2\\] No such file or directory: 'bad1.dblite'\n")
46 test.run_sconsign(arguments = "-f dblite bad1.dblite",
47 stderr = "sconsign: \\[Errno 2\\] No such file or directory: 'bad1.dblite'\n")
49 test.run_sconsign(arguments = "-f dblite bad2",
50 stderr = "sconsign: ignoring invalid `dblite' file `bad2'.*\n")
52 test.run_sconsign(arguments = "-f dblite bad2.dblite",
53 stderr = "sconsign: ignoring invalid `dblite' file `bad2.dblite'.*\n")
55 test.run_sconsign(arguments = "-f sconsign no_sconsign",
56 stderr = "sconsign: \\[Errno 2\\] No such file or directory: 'no_sconsign'\n")
58 test.run_sconsign(arguments = "-f sconsign bad3",
59 stderr = "sconsign: ignoring invalid .sconsign file `bad3'.*\n")
61 test.pass_test()
63 # Local Variables:
64 # tab-width:4
65 # indent-tabs-mode:nil
66 # End:
67 # vim: set expandtab tabstop=4 shiftwidth=4: