Sha256: 91ec6159ce2deaf14bbf74ca2b3f92411379a23ede0ba467a37ee9095e5cfbb7

Contents?: true

Size: 1.57 KB

Versions: 1

Compression:

Stored size: 1.57 KB

Contents

require 'pione/test-helper'

TestHelper.scope do |this|
  this::PNML1 = Location[File.dirname(__FILE__)] + "data" + "pione-compiler" + "Sequence.pnml"

  describe Pione::Command::PioneCompiler do
    it "should compile from PNML to PIONE document" do
      TestHelper::Command.succeed do
        Command::PioneCompiler.run [this::PNML1.path.to_s]
      end
    end

    it "should compile with package name" do
      res = TestHelper::Command.succeed do
        Command::PioneCompiler.run [this::PNML1.path.to_s, "--name", "Sequence"]
      end
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.not.include "@ Editor ::"
      res.stdout.string.should.not.include "@ Tag ::"
    end

    it "should compile with package name and editor" do
      res = TestHelper::Command.succeed do
        Command::PioneCompiler.run [this::PNML1.path.to_s, "--name", "Sequence", "--editor", "yamaguchi"]
      end
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.include "@ Editor :: \"yamaguchi\""
      res.stdout.string.should.not.include "@ Tag ::"
    end

    it "should compile with package name, editor, and tag" do
      res = TestHelper::Command.succeed do
        Command::PioneCompiler.run [this::PNML1.path.to_s, "--name", "Sequence", "--editor", "yamaguchi", "--tag", "test"]
      end
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.include "@ Editor :: \"yamaguchi\""
      res.stdout.string.should.include "@ Tag :: \"test\""
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pione-0.3.2 test/command/spec_pione-compiler.rb