Sponsored Content
Full Discussion: Ncurses status bar
Top Forums UNIX for Beginners Questions & Answers Ncurses status bar Post 303037470 by Corona688 on Friday 2nd of August 2019 11:29:18 AM
Old 08-02-2019
That's still only part of your code. Its missing libbb.h, common_bufsiz.h, misc.h, and global.h. We need those to compile your code and find the problem by testing.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Couldn't open status file /var/samba/STATUS.LCK

I believe i have most of samba configured right but i get this error each time time try to run it. I was given suggestion that i touch the file, i did, but i still cannot rid myself of this error. Any suggestions (2 Replies)
Discussion started by: macdonto
2 Replies

2. Programming

ncurses -> the best way to use menus

hello there, i'm exploring the curses lib and i'm having some trouble with "defining a style". to clarify: i'm creating a menu driven app and i've been thinking what's the best way to use menus: make global vars (not my favourite), creating a function which designs the menu and returns the... (2 Replies)
Discussion started by: crashnburn
2 Replies

3. Red Hat

Installing RedHat 8.0 onto Dell PowerEdge SC1425 - hdc: status error: status = 0x58

I have successfully installed RedHat 8.0 onto a Dell PowerEdge SC1425 today. This server has two SATA hard drives, and an IDE DVD-ROM drive. Using the following kernel parameters, i successfully installed across both hard drives from CD: ide0=0x1f0,0x3f6,14 vga=791 resolution=1024x768 expert... (5 Replies)
Discussion started by: fishsponge
5 Replies

4. Shell Programming and Scripting

status bar in shell script or perl

How To Generate different different progress bar in shell script? like we install some software it show us progress, like we install RPM that also show us progress. Thanks, Bash (2 Replies)
Discussion started by: learnbash
2 Replies

5. Shell Programming and Scripting

Replace space and vertical bar with verical bar

I am trying to get sed, tr or awk to search a file that contains records with fields delimited by the vertical bar | and replace the occurrences in the records where the vertical bar is preceded by a space " |" with a vertical bar. Sample data record zelli |||59 Stonewall Dr ||W Barnstable |MA... (2 Replies)
Discussion started by: clintrpeterson
2 Replies

6. Shell Programming and Scripting

Spinning bar status while doing something.

After some googling, I came across this script to create a spinning cursor: #!/bin/bash # paste following in your script declare -a Spinner Spinner=(/ - \\ \| / - \\ \| ) Spinnerpos=0 update_spinner() { printf "\b"${Spinner} (( Spinnerpos=(Spinnerpos +1)%8 )) } # testing... (2 Replies)
Discussion started by: mrwatkin
2 Replies

7. Programming

Help with ncurses

Help with ncurses Hi, I need some help with ncurses.I'm supposed to write a program in C to display date and time and also to input the username and password using C.I chose ncurses for my task and here I am. Code: #include <stdio.h> #include <termios.h> #include... (1 Reply)
Discussion started by: rakesh_01
1 Replies

8. Programming

ncurses refresh()

i have read in one of links, there its documented but i am using following code int main () { char ch; initscr(); printw("Enter a char :"); ch=getch(); printw("You Entered '%c' ",ch); getch(); endwin(); return 0; } the code does... (2 Replies)
Discussion started by: MrUser
2 Replies

9. Ubuntu

Why icon in status bar is disabled?

Below the list of command to explain the status michelangeli@hp:~$ lspci -nn | grep -i net 02:00.0 Ethernet controller : Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03) 04:00.0 Network controller : Ralink corp. RT2790 Wireless 802.11n 1T/2R... (6 Replies)
Discussion started by: michelangeli
6 Replies

10. Programming

How to track table status delete/update/insert status in DB2 V10 z/os?

Dear Team I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update ) Scenario We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies
Test::Simple(3pm)					User Contributed Perl Documentation					 Test::Simple(3pm)

NAME
Test::Simple - Basic utilities for writing tests. SYNOPSIS
use Test::Simple tests => 1; ok( $foo eq $bar, 'foo is bar' ); DESCRIPTION
** If you are unfamiliar with testing read Test::Tutorial first! ** This is an extremely simple, extremely basic module for writing tests suitable for CPAN modules and other pursuits. If you wish to do more complicated testing, use the Test::More module (a drop-in replacement for this one). The basic unit of Perl testing is the ok. For each thing you want to test your program will print out an "ok" or "not ok" to indicate pass or fail. You do this with the ok() function (see below). The only other constraint is you must pre-declare how many tests you plan to run. This is in case something goes horribly wrong during the test and your test program aborts, or skips a test or whatever. You do this like so: use Test::Simple tests => 23; You must have a plan. ok ok( $foo eq $bar, $name ); ok( $foo eq $bar ); ok() is given an expression (in this case "$foo eq $bar"). If it's true, the test passed. If it's false, it didn't. That's about it. ok() prints out either "ok" or "not ok" along with a test number (it keeps track of that for you). # This produces "ok 1 - Hell not yet frozen over" (or not ok) ok( get_temperature($hell) > 0, 'Hell not yet frozen over' ); If you provide a $name, that will be printed along with the "ok/not ok" to make it easier to find your test when if fails (just search for the name). It also makes it easier for the next guy to understand what your test is for. It's highly recommended you use test names. All tests are run in scalar context. So this: ok( @stuff, 'I have some stuff' ); will do what you mean (fail if stuff is empty) Test::Simple will start by printing number of tests run in the form "1..M" (so "1..5" means you're going to run 5 tests). This strange format lets Test::Harness know how many tests you plan on running in case something goes horribly wrong. If all your tests passed, Test::Simple will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run Test::Simple will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255. So the exit codes are... 0 all tests successful 255 test died or all passed but wrong # of tests run any other number how many failed (including missing or extras) If you fail more than 254 tests, it will be reported as 254. This module is by no means trying to be a complete testing system. It's just to get you started. Once you're off the ground its recommended you look at Test::More. EXAMPLE
Here's an example of a simple .t file for the fictional Film module. use Test::Simple tests => 5; use Film; # What you're testing. my $btaste = Film->new({ Title => 'Bad Taste', Director => 'Peter Jackson', Rating => 'R', NumExplodingSheep => 1 }); ok( defined($btaste) && ref $btaste eq 'Film', 'new() works' ); ok( $btaste->Title eq 'Bad Taste', 'Title() get' ); ok( $btaste->Director eq 'Peter Jackson', 'Director() get' ); ok( $btaste->Rating eq 'R', 'Rating() get' ); ok( $btaste->NumExplodingSheep == 1, 'NumExplodingSheep() get' ); It will produce output like this: 1..5 ok 1 - new() works ok 2 - Title() get ok 3 - Director() get not ok 4 - Rating() get # Failed test 'Rating() get' # in t/film.t at line 14. ok 5 - NumExplodingSheep() get # Looks like you failed 1 tests of 5 Indicating the Film::Rating() method is broken. CAVEATS
Test::Simple will only report a maximum of 254 failures in its exit code. If this is a problem, you probably have a huge test script. Split it into multiple files. (Otherwise blame the Unix folks for using an unsigned short integer as the exit status). Because VMS's exit codes are much, much different than the rest of the universe, and perl does horrible mangling to them that gets in my way, it works like this on VMS. 0 SS$_NORMAL all tests successful 4 SS$_ABORT something went wrong Unfortunately, I can't differentiate any further. NOTES
Test::Simple is explicitly tested all the way back to perl 5.6.0. Test::Simple is thread-safe in perl 5.8.1 and up. HISTORY
This module was conceived while talking with Tony Bowden in his kitchen one night about the problems I was having writing some really complicated feature into the new Testing module. He observed that the main problem is not dealing with these edge cases but that people hate to write tests at all. What was needed was a dead simple module that took all the hard work out of testing and was really, really easy to learn. Paul Johnson simultaneously had this idea (unfortunately, he wasn't in Tony's kitchen). This is it. SEE ALSO
Test::More More testing functions! Once you outgrow Test::Simple, look at Test::More. Test::Simple is 100% forward compatible with Test::More (i.e. you can just use Test::More instead of Test::Simple in your programs and things will still work). Look in Test::More's SEE ALSO for more testing modules. AUTHORS
Idea by Tony Bowden and Paul Johnson, code by Michael G Schwern <schwern@pobox.com>, wardrobe by Calvin Klein. COPYRIGHT
Copyright 2001-2008 by Michael G Schwern <schwern@pobox.com>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2011-02-23 Test::Simple(3pm)
All times are GMT -4. The time now is 12:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy