#!/bin/bash

./pharo Pharo.image save Test
./pharo Test.image eval "\
	Smalltalk at: #WaitBlock put: [:sema :tout | (sema waitTimeoutSeconds: tout) ifTrue:[ Halt now ] ]. \
  Workspace openContents:'\
\" Select all and evaluate. Should return ''OK''\"\
| sema |\
\
sema := Semaphore new.\
[ 100 factorial. sema signal ] fork.\
(Smalltalk at: #WaitBlock) value: sema value: 60*60.\
''OK''\
' withSqueakLineEndings.                                                                                                  \
SmalltalkImage current snapshot: true andQuit: true.                                                \
"
