Mercurial > hgbook
comparison en/examples/run-example @ 689:a2923aa93da9
Fix which files are included in the generated XML.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 26 Mar 2009 20:24:44 -0700 |
parents | 8366882f67f2 |
children | c82ff69f0935 |
comparison
equal
deleted
inserted
replaced
688:4bb10cfa3812 | 689:a2923aa93da9 |
---|---|
132 ofp.write('</programlisting>\n') | 132 ofp.write('</programlisting>\n') |
133 ofp.close() | 133 ofp.close() |
134 self.rename_output(self.name) | 134 self.rename_output(self.name) |
135 norm = self.name.replace(os.sep, '-') | 135 norm = self.name.replace(os.sep, '-') |
136 example.entities[ | 136 example.entities[ |
137 '<!ENTITY %s SYSTEM "results/%s.out">' % (norm, norm)] = 1 | 137 '<!ENTITY %s SYSTEM "results/%s.lxo">' % (norm, norm)] = 1 |
138 | 138 |
139 | 139 |
140 class shell_example(example): | 140 class shell_example(example): |
141 shell = '/usr/bin/env bash' | 141 shell = '/usr/bin/env bash' |
142 ps1 = '__run_example_ps1__ ' | 142 ps1 = '__run_example_ps1__ ' |
314 if out: | 314 if out: |
315 ofp_basename = '%s.%s' % (self.name, out) | 315 ofp_basename = '%s.%s' % (self.name, out) |
316 norm = os.path.normpath(ofp_basename) | 316 norm = os.path.normpath(ofp_basename) |
317 example.entities[ | 317 example.entities[ |
318 '<!ENTITY interaction.%s ' | 318 '<!ENTITY interaction.%s ' |
319 'SYSTEM "results/%s.out">' | 319 'SYSTEM "results/%s.lxo">' |
320 % (norm, norm)] = 1 | 320 % (norm, norm)] = 1 |
321 read_hint = ofp_basename + ' ' | 321 read_hint = ofp_basename + ' ' |
322 ofp = wopen(result_name(ofp_basename + '.tmp')) | 322 ofp = wopen(result_name(ofp_basename + '.tmp')) |
323 ofp.write('<screen>') | 323 ofp.write('<screen>') |
324 else: | 324 else: |