[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-609-g90739e5
Mildred Ki'Lya
silkensedai at online.fr
Thu Mar 4 20:38:49 UTC 2010
The following commit has been merged in the master branch:
commit 90739e5387c21bb28c60857ad85ddd54597fffa6
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Thu Mar 4 21:38:24 2010 +0100
Update cucumber tests
diff --git a/features/bootstrap.feature b/features/bootstrap.feature
index efe40d9..450ea92 100644
--- a/features/bootstrap.feature
+++ b/features/bootstrap.feature
@@ -4,7 +4,8 @@ Feature: Bootstrapping
I want to bootstrap the compiler
Background:
- Given lisaac/ is in the PATH
+ Given I am in the lisaac directory
+ And lisaac/ is in the PATH
And make.lip is installed
And a file "tmp/path.h" constructed with:
"""
diff --git a/features/hello-world.feature b/features/hello-world.feature
new file mode 100644
index 0000000..7514137
--- /dev/null
+++ b/features/hello-world.feature
@@ -0,0 +1,57 @@
+Feature: Hello World
+ In order to show basic features of a language
+ As a Lisaac programmer
+ I want to be able to compile a hello world
+
+ Background: Background title
+ Given lisaac/bin is in the PATH
+ And make.lip is installed
+
+ Scenario: Debug
+ Given I am in an empty directory
+ When I run pwd
+ And I print the last command output
+ When I run which lisaac
+ And I print the last command output
+ When I run echo $PATH
+ And I print the last command output
+
+ Scenario: Compile Hello World
+ Given I am in an empty directory
+ And a file "hello.li":
+ """
+ Section Header
+
+ + name := HELLO;
+
+ Section Public
+
+ - main <-
+ (
+ "Hello World!".println;
+ );
+ """
+
+ When I run lisaac hello
+ Then it should pass
+ And the output should contain
+ """
+ Depending pass:
+ """
+ And the output should contain
+ """
+ Executing pass:
+ """
+ And the output should not contain
+ """
+ WARNING
+ """
+ And "hello" should exist
+
+ When I run ./hello
+ Then it should pass with
+ """
+ Hello World!
+
+ """
+
diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb
index 4aff591..7ca11db 100644
--- a/features/step_definitions/steps.rb
+++ b/features/step_definitions/steps.rb
@@ -20,8 +20,12 @@ Given /^I am in an empty directory$/ do
FileUtils.cd(dir);
end
-Given /^I am in "(.*)"$/ do |dir|
+Given /^I am in the lisaac directory$/ do |dir|
+ @oldcwd = FileUtils.pwd();
FileUtils.cd($lisaac_path);
+end
+
+Given /^I am in "(.*)"$/ do |dir|
@oldcwd = FileUtils.pwd();
FileUtils::mkdir_p(dir);
FileUtils.cd(dir);
--
Lisaac compiler
More information about the Lisaac-commits
mailing list