Sponsored Content
Top Forums Programming Issue with Keyboard or Char Encoding During Migration Post 303046222 by Neo on Tuesday 28th of April 2020 04:19:50 AM
Old 04-28-2020
Here is the simple version.

I we have a post full of ORIGINAL v. MIGRATE threads, it is easy for me to compare, come up with code, test and retest.

Without the links, or links scattered all over the place (email, whats app messages, carrier pigeon), it is hard for me to go back and test and it take me too much time because there is a great amount of work to do.

This is why I called for testing exactly as I did in my first call for testing:

Here is an image of what we need, from my first post on this caper:

Please Help Integrity Test New Discourse Forums V2

QUOTE FROM LINK ABOVE

"
Issue with Keyboard or Char Encoding During Migration-screen-shot-2020-04-28-31655-pmjpg
"
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how2 get single char from keyboard w/o enter

I am writing a bash shell menu and would like to get a char immediately after a key is pressed. This script does not work but should give you an idea of what I am trying to do.... Thanks for the help #! /bin/bash ANSWER="" echo -en "Choose item...\n" until do $ANSWER = $STDIN ... (2 Replies)
Discussion started by: jwzumwalt
2 Replies

2. Shell Programming and Scripting

Encoding of a text issue

I created one file on windows system and is visible as : TestTable,INSERT,večilnin1ईगल受害者是第,2010-02-02 10:10:10.612447,137277,ईगल受害者是第večilnin!@#$%^&*()_+=-{}] But when send this file to unix system, the file is visible as : TestTable,INSERT,žvečilnin1ई-ल -害...是第,2010-02-02 ... (4 Replies)
Discussion started by: Shaishav Shah
4 Replies

3. Solaris

Solaris 10 p2v migration issue

Hi All, We need to move Physical Solaris 10 system to Virtual Solaris 10(p2v). Both the servers having Solaris 10(Generic_147440-25) means physical server which we are going to move is having Solaris 10 and this physical server will be converted as a virtualserver on another physical server... (9 Replies)
Discussion started by: sb200
9 Replies

4. UNIX for Dummies Questions & Answers

Strange Keyboard and Mouse Issue

Hello All, PC: CuBox-i (*i.MX6) Mini-PC OS: openSUSE 13.1 (Bottle) (armv7hl) Kernel: 3.14.14-cubox-i # uname -a Linux CuBox-HQ 3.14.14-cubox-i #1 SMP Sat Sep 13 03:48:24 UTC 2014 armv7l armv7l armv7l GNU/LinuxSo I've been having this random issue happen on this PC where a few strange... (12 Replies)
Discussion started by: mrm5102
12 Replies

5. AIX

AIX Migration issue with EMC ODM sets

Hi Experts , I want to start migrating our AIX 6.1 to AIX 7.1 . I am planning to use alt_disk_migration . Chris gibson has awesome documentation in the internet. However I am running into an issue with EMC odm filesets . So my current OS is AIX 6.1. and I have this : lslpp -l | grep EMC ... (7 Replies)
Discussion started by: JME2015
7 Replies

6. Shell Programming and Scripting

AIX to RHEL migration - awk treating 0e[0-9]+ as 0 instead of string issue

Greetings Experts, We are migrating from AIX to RHEL Linux. I have created a script to verify and report the NULLs and SPACEs in the key columns and duplicates on key combination of "|" delimited set of big files. Following is the code that was successfully running in AIX. awk -F "|" 'BEGIN {... (5 Replies)
Discussion started by: chill3chee
5 Replies

7. Solaris

View file encoding then change encoding.

Hi all!! Im using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . Im expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies
Test::WWW::Mechanize::PSGI(3pm) 			User Contributed Perl Documentation			   Test::WWW::Mechanize::PSGI(3pm)

NAME
Test::WWW::Mechanize::PSGI - Test PSGI programs using WWW::Mechanize SYNOPSIS
# We're in a t/*.t test script... use Test::WWW::Mechanize::PSGI; my $mech = Test::WWW::Mechanize::PSGI->new( app => sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/html' ], [ '<html><head><title>Hi</title></head><body>Hello World</body></html>' ] ]; }, ); $mech->get_ok('/'); is( $mech->ct, 'text/html', 'Is text/html' ); $mech->title_is('Hi'); $mech->content_contains('Hello World'); # ... and all other Test::WWW::Mechanize methods DESCRIPTION
PSGI is a specification to decouple web server environments from web application framework code. Test::WWW::Mechanize is a subclass of WWW::Mechanize that incorporates features for web application testing. The Test::WWW::Mechanize::PSGI module meshes the two to allow easy testing of PSGI applications. Testing web applications has always been a bit tricky, normally requiring starting a web server for your application and making real HTTP requests to it. This module allows you to test PSGI web applications but does not require a server or issue HTTP requests. Instead, it passes the HTTP request object directly to PSGI. Thus you do not need to use a real hostname: "http://localhost/" will do. However, this is optional. The following two lines of code do exactly the same thing: $mech->get_ok('/action'); $mech->get_ok('http://localhost/action'); This makes testing fast and easy. Test::WWW::Mechanize provides functions for common web testing scenarios. For example: $mech->get_ok( $page ); $mech->title_is( "Invoice Status", "Make sure we're on the invoice page" ); $mech->content_contains( "Andy Lester", "My name somewhere" ); $mech->content_like( qr/(cpan|perl).org/, "Link to perl.org or CPAN" ); An alternative to this module is Plack::Test. CONSTRUCTOR
new Behaves like, and calls, WWW::Mechanize's "new" method. You should pass in your application: my $mech = Test::WWW::Mechanize::PSGI->new( app => sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/plain' ], ['Hello World'] ],; }, ); METHODS
: HTTP VERBS $mech->get_ok($url, [ \%LWP_options ,] $desc) A wrapper around WWW::Mechanize's get(), with similar options, except the second argument needs to be a hash reference, not a hash. Like well-behaved "*_ok()" functions, it returns true if the test passed, or false if not. A default description of "GET $url" is used if none if provided. $mech->head_ok($url, [ \%LWP_options ,] $desc) A wrapper around WWW::Mechanize's head(), with similar options, except the second argument needs to be a hash reference, not a hash. Like well-behaved "*_ok()" functions, it returns true if the test passed, or false if not. A default description of "HEAD $url" is used if none if provided. $mech->post_ok( $url, [ \%LWP_options ,] $desc ) A wrapper around WWW::Mechanize's post(), with similar options, except the second argument needs to be a hash reference, not a hash. Like well-behaved "*_ok()" functions, it returns true if the test passed, or false if not. A default description of "POST to $url" is used if none if provided. $mech->put_ok( $url, [ \%LWP_options ,] $desc ) A wrapper around WWW::Mechanize's put(), with similar options, except the second argument needs to be a hash reference, not a hash. Like well-behaved "*_ok()" functions, it returns true if the test passed, or false if not. A default description of "PUT to $url" is used if none if provided. $mech->submit_form_ok( \%parms [, $desc] ) Makes a "submit_form()" call and executes tests on the results. The form must be found, and then submitted successfully. Otherwise, this test fails. %parms is a hashref containing the parms to pass to "submit_form()". Note that the parms to "submit_form()" are a hash whereas the parms to this function are a hashref. You have to call this function like: $agent->submit_form_ok( {n=>3}, "looking for 3rd link" ); As with other test functions, $desc is optional. If it is supplied then it will display when running the test harness in verbose mode. Returns true value if the specified link was found and followed successfully. The HTTP::Response object returned by submit_form() is not available. $mech->follow_link_ok( \%parms [, $desc] ) Makes a "follow_link()" call and executes tests on the results. The link must be found, and then followed successfully. Otherwise, this test fails. %parms is a hashref containing the parms to pass to "follow_link()". Note that the parms to "follow_link()" are a hash whereas the parms to this function are a hashref. You have to call this function like: $mech->follow_link_ok( {n=>3}, "looking for 3rd link" ); As with other test functions, $desc is optional. If it is supplied then it will display when running the test harness in verbose mode. Returns a true value if the specified link was found and followed successfully. The HTTP::Response object returned by follow_link() is not available. click_ok( $button[, $desc] ) Clicks the button named by $button. An optional $desc can be given for the test. METHODS
: CONTENT CHECKING $mech->html_lint_ok( [$desc] ) Checks the validity of the HTML on the current page. If the page is not HTML, then it fails. The URI is automatically appended to the $desc. Note that HTML::Lint must be installed for this to work. Otherwise, it will blow up. $mech->title_is( $str [, $desc ] ) Tells if the title of the page is the given string. $mech->title_is( "Invoice Summary" ); $mech->title_like( $regex [, $desc ] ) Tells if the title of the page matches the given regex. $mech->title_like( qr/Invoices for (.+)/ $mech->title_unlike( $regex [, $desc ] ) Tells if the title of the page matches the given regex. $mech->title_unlike( qr/Invoices for (.+)/ $mech->base_is( $str [, $desc ] ) Tells if the base of the page is the given string. $mech->base_is( "http://example.com/" ); $mech->base_like( $regex [, $desc ] ) Tells if the base of the page matches the given regex. $mech->base_like( qr{http://example.com/index.php?PHPSESSID=(.+)}); $mech->base_unlike( $regex [, $desc ] ) Tells if the base of the page matches the given regex. $mech->base_unlike( qr{http://example.com/index.php?PHPSESSID=(.+)}); $mech->content_is( $str [, $desc ] ) Tells if the content of the page matches the given string $mech->content_contains( $str [, $desc ] ) Tells if the content of the page contains $str. $mech->content_lacks( $str [, $desc ] ) Tells if the content of the page lacks $str. $mech->content_like( $regex [, $desc ] ) Tells if the content of the page matches $regex. $mech->content_unlike( $regex [, $desc ] ) Tells if the content of the page does NOT match $regex. $mech->has_tag( $tag, $text [, $desc ] ) Tells if the page has a $tag tag with the given content in its text. $mech->has_tag_like( $tag, $regex [, $desc ] ) Tells if the page has a $tag tag with the given content in its text. $mech->followable_links() Returns a list of links that Mech can follow. This is only http and https links. $mech->page_links_ok( [ $desc ] ) Follow all links on the current page and test for HTTP status 200 $mech->page_links_ok('Check all links'); $mech->page_links_content_like( $regex [, $desc ] ) Follow all links on the current page and test their contents for $regex. $mech->page_links_content_like( qr/foo/, 'Check all links contain "foo"' ); $mech->links_ok( $links [, $desc ] ) Follow specified links on the current page and test for HTTP status 200. The links may be specified as a reference to an array containing WWW::Mechanize::Link objects, an array of URLs, or a scalar URL name. my @links = $mech->find_all_links( url_regex => qr/cnn.com$/ ); $mech->links_ok( @links, 'Check all links for cnn.com' ); my @links = qw( index.html search.html about.html ); $mech->links_ok( @links, 'Check main links' ); $mech->links_ok( 'index.html', 'Check link to index' ); $mech->link_status_is( $links, $status [, $desc ] ) Follow specified links on the current page and test for HTTP status passed. The links may be specified as a reference to an array containing WWW::Mechanize::Link objects, an array of URLs, or a scalar URL name. my @links = $mech->followable_links(); $mech->link_status_is( @links, 403, 'Check all links are restricted' ); $mech->link_status_isnt( $links, $status [, $desc ] ) Follow specified links on the current page and test for HTTP status passed. The links may be specified as a reference to an array containing WWW::Mechanize::Link objects, an array of URLs, or a scalar URL name. my @links = $mech->followable_links(); $mech->link_status_isnt( @links, 404, 'Check all links are not 404' ); $mech->link_content_like( $links, $regex [, $desc ] ) Follow specified links on the current page and test the resulting content of each against $regex. The links may be specified as a reference to an array containing WWW::Mechanize::Link objects, an array of URLs, or a scalar URL name. my @links = $mech->followable_links(); $mech->link_content_like( @links, qr/Restricted/, 'Check all links are restricted' ); $mech->link_content_unlike( $links, $regex [, $desc ] ) Follow specified links on the current page and test that the resulting content of each does not match $regex. The links may be specified as a reference to an array containing WWW::Mechanize::Link objects, an array of URLs, or a scalar URL name. my @links = $mech->followable_links(); $mech->link_content_unlike( @links, qr/Restricted/, 'No restricted links' ); $mech->stuff_inputs( [\%options] ) Finds all free-text input fields (text, textarea, and password) in the current form and fills them to their maximum length in hopes of finding application code that can't handle it. Fields with no maximum length and all textarea fields are set to 66000 bytes, which will often be enough to overflow the data's eventual recepticle. There is no return value. If there is no current form then nothing is done. The hashref $options can contain the following keys: o ignore hash value is arrayref of field names to not touch, e.g.: $mech->stuff_inputs( { ignore => [qw( specialfield1 specialfield2 )], } ); o fill hash value is default string to use when stuffing fields. Copies of the string are repeated up to the max length of each field. E.g.: $mech->stuff_inputs( { fill => '@' # stuff all fields with something easy to recognize } ); o specs hash value is arrayref of hashrefs with which you can pass detailed instructions about how to stuff a given field. E.g.: $mech->stuff_inputs( { specs=>{ # Some fields are datatype-constrained. It's most common to # want the field stuffed with valid data. widget_quantity => { fill=>'9' }, notes => { maxlength=>2000 }, } } ); The specs allowed are fill (use this fill for the field rather than the default) and maxlength (use this as the field's maxlength instead of any maxlength specified in the HTML). AUTHOR
Leon Brocard <acme@astray.com>. COPYRIGHT
Copyright (C) 2009, Leon Brocard LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself. perl v5.12.3 2010-01-06 Test::WWW::Mechanize::PSGI(3pm)
All times are GMT -4. The time now is 06:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy