# Path: run_tests.py
# def run_makefile_string(in_string,expected_string):
# 	# parse a Makefile from a string. 
# 	# Compare resulting makefile to expected string.
# 	makefile = pymake.parse_makefile_string(in_string)
# 	m = makefile.makefile()
# 
# 	print("# start makefile")
# 	print(m)
# 	print("# end makefile")
# 
# 	print(hexdump.dump(in_string,16),end="")
# 	print(hexdump.dump(expected_string,16),end="")
# 	print(hexdump.dump(m,16),end="")
# 
# 	print("m=\"{0}\"".format(printable_string(m)))
# 	print("e=\"{0}\"".format(printable_string(expected_string)))
# 	assert m==expected_string
# 
# 	# round trip
# 	expr = str(makefile)
# 	print(expr)
# 	m2 = eval(expr).makefile()
# 	print(m2)
# 	assert m2==expected_string,m2
# 
# def runlocals(locals):
# 	# Run all functions named "testNN". Created to be imported into a script
# 	# and will run all functions named test1(), test2(), ... testN()
# 	import itertools
# 	counter = itertools.count(1)
# 	for i in counter :
# 		f = "test{0}".format(i)
# 		if not f in locals:
# 			break
# 		print("{0}()".format(f))
# 		locals[f]()


from run_tests import run_makefile_string, runlocals
	s = """\
export
"""
	run_makefile_string(s,"export")

def test4():
	s = """\
export \\
a\\
b\\
c
"""
	run_makefile_string(s,"export a b c")

def test5():
	s = """
	export  a   b   c  d	e f g
"""
	run_makefile_string(s,"export a   b   c  d	e f g")

def test6():
	s = """
export $(firstword $(FOO))
"""
	run_makefile_string(s,"export $(firstword $(FOO))")

def test7():
	s = """
	export FOO:=BAR
"""

# Path: run_tests.py
# def run_makefile_string(in_string,expected_string):
# 	# parse a Makefile from a string. 
# 	# Compare resulting makefile to expected string.
# 	makefile = pymake.parse_makefile_string(in_string)
# 	m = makefile.makefile()
# 
# 	print("# start makefile")
# 	print(m)
# 	print("# end makefile")
# 
# 	print(hexdump.dump(in_string,16),end="")
# 	print(hexdump.dump(expected_string,16),end="")
# 	print(hexdump.dump(m,16),end="")
# 
# 	print("m=\"{0}\"".format(printable_string(m)))
# 	print("e=\"{0}\"".format(printable_string(expected_string)))
# 	assert m==expected_string
# 
# 	# round trip
# 	expr = str(makefile)
# 	print(expr)
# 	m2 = eval(expr).makefile()
# 	print(m2)
# 	assert m2==expected_string,m2
# 
# def runlocals(locals):
# 	# Run all functions named "testNN". Created to be imported into a script
# 	# and will run all functions named test1(), test2(), ... testN()
# 	import itertools
# 	counter = itertools.count(1)
# 	for i in counter :
# 		f = "test{0}".format(i)
# 		if not f in locals:
# 			break
# 		print("{0}()".format(f))
# 		locals[f]()


# Path: test_export.py
from run_tests import run_makefile_string, runlocals

	s = """\
export
"""
	run_makefile_string(s,"export")

def test4():
	s = """\
export \\
a\\
b\\
c
"""
	run_makefile_string(s,"export a b c")

def test5():
	s = """
	export  a   b   c  d	e f g
"""
	run_makefile_string(s,"export a   b   c  d	e f g")

def test6():
	s = """
export $(firstword $(FOO))
"""
	run_makefile_string(s,"export $(firstword $(FOO))")

def test7():
	s = """
	export FOO:=BAR
"""

	run_makefile_string(s,"export FOO:=BAR")