Sha256: c239387fa459cc6b62795cb8ed95a4e20be20bcad16452ab3906eacc3961275d

Contents?: true

Size: 1.29 KB

Versions: 7

Compression:

Stored size: 1.29 KB

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'bundler/setup'
require 'vedeu'

class DSLApp

  Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }

  Vedeu.configure do
    height 10
    debug!
    log '/tmp/vedeu_views_dsl.log'
    renderers(Vedeu::Renderers::Terminal.new(
                filename: '/tmp/342_streams.out',
                write_file: true))
    run_once!
    standalone!
  end

  Vedeu.interface :test1_interface do
    background '#000022'
    geometry do
      x  3
      y  3
      xn 53
      yn 3
    end
  end

  Vedeu.render do
    view(:test1_interface) do
      line do
        stream do
          foreground '#cc66ff'
          left '07/01/2016 21:32:19'
        end
        stream do
          foreground '#007777'
          left ' null'
        end
        stream do
          foreground '#dddddd'
          left ' > hi'
        end
      end
    end
  end

  def self.actual
    File.read('/tmp/342_streams.out')
  end

  def self.expected
    File.read(File.expand_path('../expected/342_streams.out', __FILE__))
  end

  def self.start(argv = ARGV)
    Vedeu::Launcher.execute!(argv)
  end

end # DSLApp

DSLApp.start

if DSLApp.expected == DSLApp.actual
  puts "#{__FILE__} \e[32mPassed.\e[39m"
  exit 0;
else
  puts "#{__FILE__} \e[31mFailed.\e[39m"
  exit 1;
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vedeu-0.8.19 integrations/342_streams.rb
vedeu-0.8.18 integrations/342_streams.rb
vedeu-0.8.17 integrations/342_streams.rb
vedeu-0.8.16 integrations/342_streams.rb
vedeu-0.8.15 integrations/342_streams.rb
vedeu-0.8.14 integrations/342_streams.rb
vedeu-0.8.13 integrations/342_streams.rb