]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/str.py
1 # Copyright David Abrahams 2004. Distributed under the Boost
2 # Software License, Version 1.0. (See accompanying
3 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4 from __future__
import print_function
6 >>> from str_ext import *
7 >>> def printer(*args):
8 ... for x in args: print(x, end='')
11 >>> work_with_string(printer) #doctest: +NORMALIZE_WHITESPACE
12 ['this', 'is', 'a', 'demo', 'string']
13 ['this', 'is', 'a', 'demo string']
14 this<->is<->a<->demo<->string
16 [ this is a demo string ]
20 ['this is a demo string']
35 this is a blabla string
47 return doctest
.testmod(sys
.modules
.get(__name__
))
49 if __name__
== '__main__':
53 if (status
== 0): print("Done.")