Codebase list libmawk / 7ab313a7-f14c-465a-bfe5-5a4585f9ed23/main scconfig / src / tmpasm / regression / order.gasm
7ab313a7-f14c-465a-bfe5-5a4585f9ed23/main

Tree @7ab313a7-f14c-465a-bfe5-5a4585f9ed23/main (Download .tar.gz)

order.gasm @7ab313a7-f14c-465a-bfe5-5a4585f9ed23/mainraw · history · blame

# test if without an else
put list {one two three four}

print list {\n}

print {\nnothing:\n}

# do nothing: order matches
order out list {one} {before} {two}
print out {\n}

order out list {one} {before} {one}
print out {\n}

order out list {one} {after} {one}
print out {\n}

order out list {two} {after} {one}
print out {\n}

# do nothing: not on list matches
order out list {nine} {after} {one}
print out {\n}
order out list {one} {after} {nine}
print out {\n}

print {\nbefore:\n}
order out list {two} {before} {one}
print out {\n}

order out list {four} {before} {one}
print out {\n}

order out list {four} {before} {three}
print out {\n}

order out list {three} {before} {two}
print out {\n}

print {\nafter:\n}
order out list {one} {after} {two}
print out {\n}

order out list {one} {after} {four}
print out {\n}

order out list {two} {after} {three}
print out {\n}

order out list {two} {after} {four}
print out {\n}