Codebase list libmawk / b9006faf-873e-4aac-9952-74a72f875ff9/main scconfig / src / tmpasm / regression / order.gasm
b9006faf-873e-4aac-9952-74a72f875ff9/main

Tree @b9006faf-873e-4aac-9952-74a72f875ff9/main (Download .tar.gz)

order.gasm @b9006faf-873e-4aac-9952-74a72f875ff9/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}