summaryrefslogtreecommitdiff
path: root/test/systemu_test.rb
diff options
context:
space:
mode:
authorahoward <ara.t.howard@gmail.com>2013-12-07 15:05:56 -0700
committerahoward <ara.t.howard@gmail.com>2013-12-07 15:05:56 -0700
commitb23da2d383effec160ddf22725a330885077f89b (patch)
tree22608c68f6205b6349ae81236b2f4bba88522437 /test/systemu_test.rb
parent4e2d1bc6643c72e769b11094e5d4880fb9f94344 (diff)
downloadsystemu-b23da2d383effec160ddf22725a330885077f89b.tar.gz
handle silly hostnames
Diffstat (limited to 'test/systemu_test.rb')
-rw-r--r--test/systemu_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/systemu_test.rb b/test/systemu_test.rb
index 19fac1d..6d4bf2b 100644
--- a/test/systemu_test.rb
+++ b/test/systemu_test.rb
@@ -17,6 +17,20 @@ Testing SystemU do
assert{ stdout == stdin }
end
+ testing 'silly hostnames' do
+ host = SystemU.instance_variable_get('@host')
+ silly_hostname = "silly's hostname with spaces"
+ begin
+ SystemU.instance_variable_set('@host', silly_hostname)
+ assert{ SystemU.instance_variable_get('@host') == silly_hostname }
+ stdin = '42'
+ status, stdout, stderr = assert{ systemu :bin/:cat, :stdin => stdin }
+ assert{ status == 0 }
+ ensure
+ assert{ SystemU.instance_variable_set('@host', host) }
+ end
+ end
+
end