Blame tests/p_ruby/25_ruby_hello-world.sh
|
Christoph Galuschka |
68f734 |
#!/bin/sh
|
|
Christoph Galuschka |
68f734 |
# Author: Christoph Galuschka <christoph.galuschka@chello.at>
|
|
Christoph Galuschka |
68f734 |
|
|
Christoph Galuschka |
68f734 |
t_Log "Running $0 - ruby can run 'hello world'"
|
|
Christoph Galuschka |
68f734 |
|
|
Christoph Galuschka |
68f734 |
# create ruby script
|
|
Christoph Galuschka |
8b999b |
FILE=/var/tmp/test.rb
|
|
Christoph Galuschka |
68f734 |
cat > $FILE <
|
|
Christoph Galuschka |
68f734 |
#!/usr/bin/ruby
|
|
Christoph Galuschka |
68f734 |
# Hello world ruby program
|
|
Christoph Galuschka |
68f734 |
puts "hello world";
|
|
Christoph Galuschka |
68f734 |
EOF
|
|
Christoph Galuschka |
68f734 |
|
|
Christoph Galuschka |
68f734 |
ruby $FILE | grep -q 'hello world'
|
|
Christoph Galuschka |
8b999b |
|
|
Christoph Galuschka |
68f734 |
t_CheckExitStatus $?
|
|
Christoph Galuschka |
8b999b |
|
|
Christoph Galuschka |
8b999b |
# and clean up
|
|
Christoph Galuschka |
8b999b |
/bin/rm ${FILE}
|